Skip to content

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Dec 27, 2022

As a bonus, this stops special casing clean in Builder.

Motivation

Cleaning artifacts isn't strictly necessary to get cargo to rebuild; touch compiler/rustc_driver/src/lib.rs (for example) will also work. There's two reasons I thought making this part of bootstrap proper was a better approach:

  1. touch does not remove artifacts, it just causes a rebuild. This is unhelpful for when you want to measure how long the compiler itself takes to build (e.g. for The rustc_query_impl crate is too big, which hurts compile times for the compiler itself #65031).
  2. It seems a little more discoverable; and I want to extend it in the future to things like x clean --stage 1 rustc, which makes it easier to work around ICE: stage2 builds of rustc itself see metadata serialized by a different rustc #76720 without having to completely wipe all the stage 0 artifacts, or having to be intimately familiar with which directories to remove.

@rustbot
Copy link
Collaborator

rustbot commented Dec 27, 2022

r? @Mark-Simulacrum

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 27, 2022
@Mark-Simulacrum
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Dec 27, 2022

📌 Commit 99746a921de1016ab270e394427e982833a89daa has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 27, 2022
Comment on lines +100 to +101
/// Return a `-p=x -p=y` string suitable for passing to a cargo invocation.
pub fn cargo_crates_in_set(&self) -> Interned<Vec<String>> {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved from compile.rs below without changes.

Comment on lines +1090 to +1097
/// Like `cargo`, but only passes flags that are valid for all commands.
pub fn bare_cargo(
&self,
compiler: Compiler,
mode: Mode,
target: TargetSelection,
cmd: &str,
) -> Command {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved from fn cargo below without changes (other than returning cargo)

@jyn514
Copy link
Member Author

jyn514 commented Dec 27, 2022

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 27, 2022
@jyn514 jyn514 mentioned this pull request Dec 27, 2022
As a bonus, this stops special casing `clean` in `Builder`.
@jyn514
Copy link
Member Author

jyn514 commented Dec 27, 2022

@bors r=Mark-Simulacrum

@bors
Copy link
Collaborator

bors commented Dec 27, 2022

📌 Commit 6d388a4 has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 27, 2022
@bors
Copy link
Collaborator

bors commented Dec 27, 2022

⌛ Testing commit 6d388a4 with merge b38a6d3...

@bors
Copy link
Collaborator

bors commented Dec 27, 2022

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing b38a6d3 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 27, 2022
@bors bors merged commit b38a6d3 into rust-lang:master Dec 27, 2022
@rustbot rustbot added this to the 1.68.0 milestone Dec 27, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (b38a6d3): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.8% [3.8%, 3.8%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

@jyn514 jyn514 deleted the clean-crates branch February 25, 2023 18:32
@jyn514 jyn514 changed the title Allow cleaning individual crates bootstrap: Allow cleaning individual crates Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants