-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add --keep-stage-std
to x.py
for keeping only standard library artifacts
#77120
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
I have been unable to come up with a use case for keep-staging the compiler, but I do think it makes sense to not do so. Maybe we should:
|
This keeps only the `std` artifacts compiled by the given stage, not the compiler. This is useful when working on the latter stages of the compiler in tandem with the standard library, since you don't have to rebuild the *entire* compiler when the standard library changes.
7838779
to
bcbd2cc
Compare
--keep-stage
when building the compiler--keep-stage-std
keeping only standard library artifacts
Done. The new warning for |
--keep-stage-std
keeping only standard library artifacts--keep-stage-std
to x.py
for keeping only standard library artifacts
I think it's good. We just recently landed a changelog for bootstrap, and I think adding this there makes sense (though without incrementing the version). Could you add to it? It's in https://github.com/rust-lang/rust/blob/master/src/bootstrap/CHANGELOG.md. Something quick like "Deprecated keep-stage in favor of keep-stage-std" and a link to this PR seems sufficient. r=me with that entry added |
I don't know if you want feedback, but there are some (rare) use cases where I find I would also think if anyone is working on a |
Interesting cases! I am definitely interested in hearing about them :) I think documentation changes are indeed a great example -- I think basically all of those fall under "I've modified the compiler in a way that does not affect the binary, but just separate outputs" which I didn't realize we had, but of course we definitely do. In that case @ecstatic-morse let's avoid the "deprecated" language and just document the addition of keep-stage-std. I think suggesting its use for keep-stage users still makes sense, though, if it's possible. |
@bors r+ |
📌 Commit c0ddaed has been approved by |
Should be good to go now. |
Oh I had forgotten myself :) @bors r+ |
📌 Commit 16769eb has been approved by |
…rk-Simulacrum Add `--keep-stage-std` to `x.py` for keeping only standard library artifacts Unlike `--keep-stage 0`, `--keep-stage-std 0` will allow the stage 0 compiler artifacts (i.e., stage1/bin/rustc) to be rebuilt if it has changed. This allows contributors to iterate on later stages of the compiler in tandem with the standard library without needing to to rebuild the entire compiler. I often run into this when working on const-checking, since I may need to add a feature gate or make a small tweak to the standard library.
…rk-Simulacrum Add `--keep-stage-std` to `x.py` for keeping only standard library artifacts Unlike `--keep-stage 0`, `--keep-stage-std 0` will allow the stage 0 compiler artifacts (i.e., stage1/bin/rustc) to be rebuilt if it has changed. This allows contributors to iterate on later stages of the compiler in tandem with the standard library without needing to to rebuild the entire compiler. I often run into this when working on const-checking, since I may need to add a feature gate or make a small tweak to the standard library.
…as-schievink Rollup of 15 pull requests Successful merges: - rust-lang#76932 (Relax promises about condition variable.) - rust-lang#76973 (Unstably allow assume intrinsic in const contexts) - rust-lang#77005 (BtreeMap: refactoring around edges) - rust-lang#77066 (Fix dest prop miscompilation around references) - rust-lang#77073 (dead_code: look at trait impls even if they don't contain items) - rust-lang#77086 (Include libunwind in the rust-src component.) - rust-lang#77097 (Make [].as_[mut_]ptr_range() (unstably) const.) - rust-lang#77106 (clarify that `changelog-seen = 1` goes to the beginning of config.toml) - rust-lang#77120 (Add `--keep-stage-std` to `x.py` for keeping only standard library artifacts) - rust-lang#77126 (Invalidate local LLVM cache less often) - rust-lang#77146 (Install std for non-host targets) - rust-lang#77155 (remove enum name from ImplSource variants) - rust-lang#77176 (Removing erroneous semicolon in transmute documentation) - rust-lang#77183 (Allow multiple allow_internal_unstable attributes) - rust-lang#77189 (Remove extra space from vec drawing) Failed merges: r? `@ghost`
Unlike
--keep-stage 0
,--keep-stage-std 0
will allow the stage 0 compiler artifacts (i.e., stage1/bin/rustc) to be rebuilt if it has changed. This allows contributors to iterate on later stages of the compiler in tandem with the standard library without needing to to rebuild the entire compiler. I often run into this when working on const-checking, since I may need to add a feature gate or make a small tweak to the standard library.