mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 02:00:00 +03:00
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.
This commit is contained in:
@@ -237,9 +237,15 @@ fn typecheck_source(config: &config, props: &TestProps,
|
||||
|
||||
fn make_typecheck_args(config: &config, props: &TestProps, testfile: &Path) -> ProcArgs {
|
||||
let aux_dir = aux_output_dir_name(config, testfile);
|
||||
let target = if props.force_host {
|
||||
config.host.as_slice()
|
||||
} else {
|
||||
config.target.as_slice()
|
||||
};
|
||||
// FIXME (#9639): This needs to handle non-utf8 paths
|
||||
let mut args = ~[~"-",
|
||||
~"--no-trans", ~"--lib",
|
||||
~"--target=" + target,
|
||||
~"-L", config.build_base.as_str().unwrap().to_owned(),
|
||||
~"-L",
|
||||
aux_dir.as_str().unwrap().to_owned()];
|
||||
|
||||
Reference in New Issue
Block a user