diff options
| author | Brian Anderson <banderson@mozilla.com> | 2014-01-18 18:23:46 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2014-01-18 18:23:46 -0800 |
| commit | 2d656d6285e5db5c2a23c0144b5b97e637e61a6c (patch) | |
| tree | 9c3c672520277ff0bb4d21a260dea16bb3c43601 /src/compiletest | |
| parent | 2ff5963b9da3a0be40d3ea56cf9d4063fc5ac32d (diff) | |
| download | rust-2d656d6285e5db5c2a23c0144b5b97e637e61a6c.tar.gz rust-2d656d6285e5db5c2a23c0144b5b97e637e61a6c.zip | |
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.
Diffstat (limited to 'src/compiletest')
| -rw-r--r-- | src/compiletest/runtest.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs index 6b822fedda6..9ebc8236f6f 100644 --- a/src/compiletest/runtest.rs +++ b/src/compiletest/runtest.rs @@ -237,9 +237,15 @@ actual:\n\ 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()]; |
