Skip to content

Commit a169b51

Browse files
Auto merge of #142117 - jieyouxu:revert-rustc-sysroot-handling, r=<try>
[DO NOT MERGE] Experimental revert r? ghost try-job: aarch64-apple
2 parents d00435f + 2114570 commit a169b51

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

library/std/src/sys/process/unix/unix.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Force test comment
12
#[cfg(target_os = "vxworks")]
23
use libc::RTP_ID as pid_t;
34
#[cfg(not(target_os = "vxworks"))]

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 => {

src/bootstrap/src/core/config/config.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ use crate::{Command, GitInfo, OnceLock, TargetSelection, check_ci_llvm, helpers,
6666
#[rustfmt::skip] // We don't want rustfmt to oneline this list
6767
pub const RUSTC_IF_UNCHANGED_ALLOWED_PATHS: &[&str] = &[
6868
":!library",
69+
":!src/bootstrap", // DO NOT MERGE, permit experimental bootstrap changes
6970
":!src/tools",
7071
":!src/librustdoc",
7172
":!src/rustdoc-json-types",

0 commit comments

Comments
 (0)