Print step stack trace when bootstrap panics#159040
Merged
Merged
Conversation
Since the bootstrap command execution redesign, build_helper no longer has to implement these functions. By moving them to boostrap, we can enrich them with bootstrap-specific information.
Collaborator
|
This PR changes how LLVM is built. Consider updating src/bootstrap/download-ci-llvm-stamp. This PR modifies If appropriate, please update |
jieyouxu
approved these changes
Jul 10, 2026
Member
There was a problem hiding this comment.
Thanks, this looks useful.
I tried this locally with an inserted panic!() in compile::Assemble w/ ./x test library --stage=2 --dry-run:
Bootstrap has panicked, currently active steps:
compile::Assemble { target_compiler: Compiler { stage: 2, host: x86_64-unknown-linux-gnu, forced_compiler: false } } at src/bootstrap/src/core/build_steps/compile.rs:142
compile::Assemble { target_compiler: Compiler { stage: 1, host: x86_64-unknown-linux-gnu, forced_compiler: false } } at src/bootstrap/src/core/build_steps/compile.rs:2299
compile::Assemble { target_compiler: Compiler { stage: 0, host: x86_64-unknown-linux-gnu, forced_compiler: false } } at src/bootstrap/src/core/build_steps/compile.rs:2299
Build completed unsuccessfully in 0:00:05
@bors r+ rollup
Contributor
rust-bors Bot
pushed a commit
that referenced
this pull request
Jul 10, 2026
Rollup of 7 pull requests Successful merges: - #155429 (Support `u128`/`i128` c-variadic arguments) - #158899 (Fix `unaligned_volatile_store` by removing `MemFlags::UNALIGNED`) - #158640 (Handle nested inline consts in const argument checks) - #158866 ([perf] Add explicit `Iterator::count` impl for `ChunkBy`.) - #158912 (Introduce new bootstrap config section for PGO configuration) - #159040 (Print step stack trace when bootstrap panics) - #159056 (Print a loud error if the configured LLDB cannot be found)
rust-timer
added a commit
that referenced
this pull request
Jul 10, 2026
Rollup merge of #159040 - Kobzol:bootstrap-step-trace, r=jieyouxu Print step stack trace when bootstrap panics This should make it easier to debug what has happened, or rather where has bootstrap failed, when a panic occurs. ~~I also want to print the step trace on CI when bootstrap fails, but for that I have to first clean up some things in `build_helper`.~~ Nevermind, I added it to this PR. Fixes: #159022 CC @jyn514 r? @jieyouxu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This should make it easier to debug what has happened, or rather where has bootstrap failed, when a panic occurs.
I also want to print the step trace on CI when bootstrap fails, but for that I have to first clean up some things inNevermind, I added it to this PR.build_helper.Fixes: #159022
CC @jyn514
r? @jieyouxu