Skip to content

Commit

Permalink
Rollup merge of #128108 - onur-ozkan:ensure-std-for-precompiled-rustc…
Browse files Browse the repository at this point in the history
…, r=Kobzol

ensure std step before preparing sysroot

When using download-rustc, any stage other than 0 or 1 (e.g., cargo +stage2 build/doc) will fail to find std while compiling on simple rust sources. Ensuring the std step fixes this issue.

r? Kobzol
  • Loading branch information
matthiaskrgr authored Jul 24, 2024
2 parents 8884228 + 2f55ced commit 1fe9726
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/bootstrap/src/core/build_steps/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1700,6 +1700,7 @@ impl Step for Assemble {

// If we're downloading a compiler from CI, we can use the same compiler for all stages other than 0.
if builder.download_rustc() {
builder.ensure(Std::new(target_compiler, target_compiler.host));
let sysroot =
builder.ensure(Sysroot { compiler: target_compiler, force_recompile: false });
// Ensure that `libLLVM.so` ends up in the newly created target directory,
Expand Down

0 comments on commit 1fe9726

Please sign in to comment.