-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Fix rustc uplifting (take two) #145645
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
Fix rustc uplifting (take two) #145645
Conversation
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.
These stage numbers are getting out of hand /s
More seriously, I'm okay with this current approach as a temporary measure. Uplifting really is very iffy.
Going to jump the queue here to fix broken cross builds. |
☀️ Test successful - checks-actions |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing bec7474 (parent) -> e8a792d (this PR) Test differencesShow 6 test diffsStage 0
Additionally, 2 doctest diffs were found. These are ignored, as they are noisy. Job group index Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard e8a792daf500b5ff8097896ddb6cc037abe92487 --output-dir test-dashboard And then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
Finished benchmarking commit (e8a792d): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResults (secondary -0.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 471.629s -> 471.66s (0.01%) |
The rustc uplifting logic is really annoying.. #145557 was not enough to fix it.
Consider #145534 (comment): in this situation, we do a stage3 build of a cross-compiled rustc (it happens because we run
x test --stage 2
, which mistakenly builds a stage3 rustc, but it doesn't matter what casuses it, what matters is that the stage3 build isn't working).Currently, a stage3 cross-compiled build of rustc works like this:
The problem is that in the uplifting logic, I assumed that we will have a stage2 (target) rustc available, which we can uplift. And that would indeed be an ideal solution. But currently, we will actually build a stage2 (host) rustc, and only then start the cross-compilation. So the uplifting is broken.
I spend a couple of hours trying to fix this, and do the uplifting "from the other direction", so that already when we assemble a stage3 rustc, we notice that an uplift should happen, and we only build stage1 (host) rustc, which also helps avoid one needless rustc build. However, this was relatively complicated and would require larger changes that I was not confident landing at this time.
So instead I decided to do a much simpler fix, and just disable rustc uplifting when cross-compiling. Since we currently do the
stage2 (host) -> stage3 (target)
step, it should not actually affect stage3 cross-compiled builds in any way (I hope..), and should only affect stage4+ builds, about which I don't really care (the only change there should be more rustc builds). For normal builds, the stage2 host rustc should (hopefully) always be present, so we shouldn't run into this issue.Eventually, I would like to remove rustc uplifting completely. However,
x test --stage 2
on CI still currently builds a stage3 rustc for some reason, and if we removed uplifting completely, even for non-cross-compiled builds, that would cause an additional rustc build, and that's not great. So for now let's just allow uplifting for non-cross-compiled builds.Fixes #145534.
r? @jieyouxu