Skip to content

Commit c62ef2e

Browse files
committed
Fix cross-compiled pretty tests
They need to read the metadata of cross-compiled crates, so the pretty things need to have the right target.
1 parent d4640f9 commit c62ef2e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/compiletest/runtest.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ fn run_pretty_test(config: &config, props: &TestProps, testfile: &Path) {
206206
}
207207

208208
fn make_pp_args(config: &config, _testfile: &Path) -> ProcArgs {
209-
let args = ~[~"-", ~"--pretty", ~"normal"];
209+
let args = ~[~"-", ~"--pretty", ~"normal",
210+
~"--target=" + config.target];
210211
// FIXME (#9639): This needs to handle non-utf8 paths
211212
return ProcArgs {prog: config.rustc_path.as_str().unwrap().to_owned(), args: args};
212213
}

0 commit comments

Comments
 (0)