fix: rust-project.json projects not preferring sysroot rustc

This commit is contained in:
Lukas Wirth 2024-02-27 10:20:07 +01:00
parent d4d9d0c85a
commit 64c17a9b2e
6 changed files with 25 additions and 18 deletions

View file

@ -57,8 +57,7 @@ pub fn get(
RustcDataLayoutConfig::Rustc(sysroot) => sysroot,
};
let mut cmd = Command::new(toolchain::Tool::Rustc.path());
Sysroot::set_rustup_toolchain_env(&mut cmd, sysroot);
let mut cmd = Sysroot::rustc(sysroot);
cmd.envs(extra_env)
.args(["-Z", "unstable-options", "--print", "target-spec-json"])
.env("RUSTC_BOOTSTRAP", "1");