-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
do not build additional stage on compiler paths #137882
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
Conversation
When calling `x build compiler (or rustc) --stage N` bootstrap builds stage N+1 compiler, which is clearly not what we requested. This doesn't happen when running `x build --stage N` without explicitly targeting the compiler. The changes applied fix this issue. Signed-off-by: onur-ozkan <work@onurozkan.dev>
| first(builder.cache.all::<compile::Assemble>()), | ||
| &[ | ||
| rustc!(TEST_TRIPLE_1 => TEST_TRIPLE_1, stage = 0), | ||
| rustc!(TEST_TRIPLE_1 => TEST_TRIPLE_1, stage = 1), | ||
| rustc!(TEST_TRIPLE_1 => TEST_TRIPLE_1, stage = 2), | ||
| rustc!(TEST_TRIPLE_1 => TEST_TRIPLE_2, stage = 1), | ||
| rustc!(TEST_TRIPLE_1 => TEST_TRIPLE_2, stage = 2), | ||
| compile::Assemble { | ||
| target_compiler: Compiler { | ||
| host: TargetSelection::from_user(TEST_TRIPLE_1), | ||
| stage: 0 | ||
| } | ||
| }, | ||
| compile::Assemble { | ||
| target_compiler: Compiler { | ||
| host: TargetSelection::from_user(TEST_TRIPLE_1), | ||
| stage: 1 | ||
| } | ||
| }, | ||
| compile::Assemble { | ||
| target_compiler: Compiler { | ||
| host: TargetSelection::from_user(TEST_TRIPLE_1), | ||
| stage: 2 | ||
| } | ||
| }, | ||
| compile::Assemble { | ||
| target_compiler: Compiler { | ||
| host: TargetSelection::from_user(TEST_TRIPLE_2), | ||
| stage: 2 | ||
| } | ||
| }, |
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.
This would include stage3 compiler on master.
|
@rustbot ready r? bootstrap |
Signed-off-by: onur-ozkan <work@onurozkan.dev>
bd24ae8 to
cfb475c
Compare
|
One of those PRs where @bors r+ |
|
🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened. |
Yeah, it has saved me lots of hours in my recent works.. |
|
I'm a bit confused by |
|
Can you say more about |
|
So, my understanding is that My confusion is that |
|
|
|
Before this change, After this change, Also note that this new behaviour is now inconsistent with |
|
To make it clear, this change makes
|
|
Ah, I think the reason It still builds the stage 1 compiler, of course, but only because having a working stage 1 compiler is required for other things (e.g. |
|
This broke the rustc-perf bootstrap benchmark, because it does |
Yeah, previous |
This is not a bug fix; it's an ad-hoc breaking change to how stage numbering works for There are arguments for and against that, but I'm concerned that nobody involved seems to understand or acknowledge that this is what's happening. After this PR, The reason
It was not magically incrementing the stage. It was using the stage N compiler, as requested, to build the compiler. The result of doing that is the stage N+1 compiler. That's why the +1 was deliberately included. After this PR, |
Yeah I am aware that, but why do you think it was not a default
That's exactly what was the problem with Rustc tools and many people was arguing about it for years, which is fixed with #137215. |
When calling
x build compiler (or rustc) --stage Nbootstrap builds stage N+1 compiler, which is clearly not what we requested. This doesn't happen when runningx build --stage Nwithout explicitly targeting the compiler.The changes applied fix this issue.
r? ghost