Pass --target before -- for cargo rustc

This commit is contained in:
Elliot Roberts 2025-08-30 13:36:29 -07:00
parent a271dac578
commit 32e2b60d86

View File

@ -23,14 +23,11 @@ pub fn get(
QueryConfig::Cargo(sysroot, cargo_toml, _) => {
let mut cmd = sysroot.tool(Tool::Cargo, cargo_toml.parent(), extra_env);
cmd.env("RUSTC_BOOTSTRAP", "1");
cmd.args(["rustc", "-Z", "unstable-options"]).args(RUSTC_ARGS).args([
"--",
"-Z",
"unstable-options",
]);
cmd.args(["rustc", "-Z", "unstable-options"]).args(RUSTC_ARGS);
if let Some(target) = target {
cmd.args(["--target", target]);
}
cmd.args(["--", "-Z", "unstable-options"]);
match utf8_stdout(&mut cmd) {
Ok(output) => return process(output),
Err(e) => {