Skip to content

Commit fd66847

Browse files
committed
Revert "remove outdated RUSTC_SYSROOT handling for ci-rustc"
This reverts commit 7af12a1.
1 parent c10d1c1 commit fd66847

File tree

1 file changed

+10
-0
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+10
-0
lines changed

src/bootstrap/src/core/build_steps/test.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2707,6 +2707,16 @@ impl Step for Crate {
27072707
.arg(builder.src.join("library/sysroot/Cargo.toml"));
27082708
} else {
27092709
compile::std_cargo(builder, target, compiler.stage, &mut cargo);
2710+
// `std_cargo` actually does the wrong thing: it passes `--sysroot build/host/stage2`,
2711+
// but we want to use the force-recompile std we just built in `build/host/stage2-test-sysroot`.
2712+
// Override it.
2713+
if builder.download_rustc() && compiler.stage > 0 {
2714+
let sysroot = builder
2715+
.out
2716+
.join(compiler.host)
2717+
.join(format!("stage{}-test-sysroot", compiler.stage));
2718+
cargo.env("RUSTC_SYSROOT", sysroot);
2719+
}
27102720
}
27112721
}
27122722
Mode::Rustc => {

0 commit comments

Comments
 (0)