-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
redesign stage 0 std #119899
base: master
Are you sure you want to change the base?
redesign stage 0 std #119899
Conversation
This comment has been minimized.
This comment has been minimized.
9fcee5c
to
066ce06
Compare
This comment has been minimized.
This comment has been minimized.
066ce06
to
472c50c
Compare
This comment has been minimized.
This comment has been minimized.
ce81474
to
b688ffa
Compare
This comment has been minimized.
This comment has been minimized.
5f1747d
to
00e59f0
Compare
This PR modifies If appropriate, please update |
@rustbot ready r? bootstrap |
00e59f0
to
8ac271c
Compare
@rustbot author (currently stage 2 std is copied from stage 1 and this behaviour should change with the beta std change) |
bcedb49
to
5071fac
Compare
I tried However, when I actually tried to use the stage2 sysroot, it fails with this:
It seems like multiple standard libraries are being copied to the stage2 sysroot. |
5071fac
to
ba875be
Compare
Thanks for testing it! Can you try again? It should be working now. |
Thanks! It indeed seems to work now, and changes in stdlib are reflected in the stage2 toolchain. Given the amount of One thing I have noticed is that if I modify stdlib and then try to rebuild a crate using the stage2 toolchain, cargo doesn't notice that the stdlib has been invalidated, and I have to remove the |
That happens on master even without CI-rustc enabled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
☔ The latest upstream changes (presumably #136974) made this pull request unmergeable. Please resolve the merge conflicts. |
On stage 0, rather than compiling std utilize the one from the stage0 sysroot as stage 0 should represent the snapshot version not the compiled one. Signed-off-by: onur-ozkan <[email protected]>
Signed-off-by: onur-ozkan <[email protected]>
Signed-off-by: onur-ozkan <[email protected]>
Signed-off-by: onur-ozkan <[email protected]>
Signed-off-by: onur-ozkan <[email protected]>
Signed-off-by: onur-ozkan <[email protected]>
Signed-off-by: onur-ozkan <[email protected]>
Signed-off-by: onur-ozkan <[email protected]>
Signed-off-by: onur-ozkan <[email protected]>
Signed-off-by: onur-ozkan <[email protected]>
Signed-off-by: onur-ozkan <[email protected]>
Signed-off-by: onur-ozkan <[email protected]>
Signed-off-by: onur-ozkan <[email protected]>
Signed-off-by: onur-ozkan <[email protected]>
Signed-off-by: onur-ozkan <[email protected]>
Signed-off-by: onur-ozkan <[email protected]>
Signed-off-by: onur-ozkan <[email protected]>
Signed-off-by: onur-ozkan <[email protected]>
ba875be
to
8072fa1
Compare
Rebased. |
Summary
This PR changes how bootstrap builds the stage 1 compiler by switching to precompiled stage 0 standard library instead of building the in-tree one. The goal was to update bootstrap to use the beta standard library at stage 0 rather than compiling it from source (see the motivation at rust-lang/compiler-team#619).
Previously, to build a stage 1 compiler bootstrap followed this path:
With this PR, the new path is:
This also means that
cfg(bootstrap)
/cfg(not(bootstrap))
is no longer needed for library development.Building "library"
Since stage0
std
is no longer in-treex build/test/check library --stage 0
is now no-op. The minimum supported stage to buildstd
is now 1. For the same reason, default stage values in the library profile is no longer 0.Because building the in-tree library now requires a stage1 compiler, I highly recommend library developers to enable
download-rustc
to speed up compilation time.If you encounter a bug or unexpected results please open a topic in the #t-infra/bootstrap Zulip channel or create a bootstrap issue.
Blocked on #122709