Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit d422d50

Browse files
committed
Pass --sysroot when building the new sysroot
To avoid accidentally loading the original libcore
1 parent f820168 commit d422d50

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

build_system/build_sysroot.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ fn build_clif_sysroot_for_triple(
188188
let mut build_cmd = cargo_command("cargo", "build", Some(triple), Path::new("build_sysroot"));
189189
let mut rustflags = "-Zforce-unstable-if-unmarked -Cpanic=abort".to_string();
190190
rustflags.push_str(&format!(" -Zcodegen-backend={}", cg_clif_dylib_path.to_str().unwrap()));
191+
rustflags.push_str(&format!(" --sysroot={}", target_dir.to_str().unwrap()));
191192
if channel == "release" {
192193
build_cmd.arg("--release");
193194
rustflags.push_str(" -Zmir-opt-level=3");

0 commit comments

Comments
 (0)