Skip to content

Commit 2d656d6

Browse files
committed
Pass the correct --target flag when type checking pretty-printed code in tests
This makes pretty print tests that have aux crates work correctly on Android. Without they generate errors ICEs about incorrect node ids. Not sure why.
1 parent 2ff5963 commit 2d656d6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/compiletest/runtest.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,15 @@ actual:\n\
237237

238238
fn make_typecheck_args(config: &config, props: &TestProps, testfile: &Path) -> ProcArgs {
239239
let aux_dir = aux_output_dir_name(config, testfile);
240+
let target = if props.force_host {
241+
config.host.as_slice()
242+
} else {
243+
config.target.as_slice()
244+
};
240245
// FIXME (#9639): This needs to handle non-utf8 paths
241246
let mut args = ~[~"-",
242247
~"--no-trans", ~"--lib",
248+
~"--target=" + target,
243249
~"-L", config.build_base.as_str().unwrap().to_owned(),
244250
~"-L",
245251
aux_dir.as_str().unwrap().to_owned()];

0 commit comments

Comments
 (0)