Skip to content

Commit 32e2b60

Browse files
Pass --target before -- for cargo rustc
1 parent a271dac commit 32e2b60

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

crates/project-model/src/toolchain_info/target_data_layout.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,11 @@ pub fn get(
2323
QueryConfig::Cargo(sysroot, cargo_toml, _) => {
2424
let mut cmd = sysroot.tool(Tool::Cargo, cargo_toml.parent(), extra_env);
2525
cmd.env("RUSTC_BOOTSTRAP", "1");
26-
cmd.args(["rustc", "-Z", "unstable-options"]).args(RUSTC_ARGS).args([
27-
"--",
28-
"-Z",
29-
"unstable-options",
30-
]);
26+
cmd.args(["rustc", "-Z", "unstable-options"]).args(RUSTC_ARGS);
3127
if let Some(target) = target {
3228
cmd.args(["--target", target]);
3329
}
30+
cmd.args(["--", "-Z", "unstable-options"]);
3431
match utf8_stdout(&mut cmd) {
3532
Ok(output) => return process(output),
3633
Err(e) => {

0 commit comments

Comments
 (0)