mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-17 05:25:37 +03:00
Rollup merge of #71002 - Freax13:fix-target, r=ollie27
fix target & runtool args order - `TargetTripple::to_string` converts "path triples" to `<target>-<hash>`, but in this case we need the path. Afaict there is no method to get the real triple other than manually matching - the order of the runtools arguments is inconsistent with the way tests usually pass arguments ie using `runner` key in `.cargo/config`
This commit is contained in:
@@ -263,7 +263,12 @@ fn run_test(
|
||||
if no_run && !compile_fail {
|
||||
compiler.arg("--emit=metadata");
|
||||
}
|
||||
compiler.arg("--target").arg(target.to_string());
|
||||
compiler.arg("--target").arg(match target {
|
||||
TargetTriple::TargetTriple(s) => s,
|
||||
TargetTriple::TargetPath(path) => {
|
||||
path.to_str().expect("target path must be valid unicode").to_string()
|
||||
}
|
||||
});
|
||||
|
||||
compiler.arg("-");
|
||||
compiler.stdin(Stdio::piped());
|
||||
@@ -312,8 +317,8 @@ fn drop(&mut self) {
|
||||
|
||||
if let Some(tool) = runtool {
|
||||
cmd = Command::new(tool);
|
||||
cmd.arg(output_file);
|
||||
cmd.args(runtool_args);
|
||||
cmd.arg(output_file);
|
||||
} else {
|
||||
cmd = Command::new(output_file);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user