Allow overwriting the sysroot compile flag in compile tests
This commit is contained in:
parent
7fde08365c
commit
e434b5b9ec
@ -1900,8 +1900,11 @@ impl<'test> TestCx<'test> {
|
||||
// Use a single thread for efficiency and a deterministic error message order
|
||||
rustc.arg("-Zthreads=1");
|
||||
|
||||
// In stage 0, make sure we use `stage0-sysroot` instead of the bootstrap sysroot.
|
||||
rustc.arg("--sysroot").arg(&self.config.sysroot_base);
|
||||
// Optionally prevent default --sysroot if specified in test compile-flags.
|
||||
if !self.props.compile_flags.iter().any(|flag| flag.starts_with("--sysroot")) {
|
||||
// In stage 0, make sure we use `stage0-sysroot` instead of the bootstrap sysroot.
|
||||
rustc.arg("--sysroot").arg(&self.config.sysroot_base);
|
||||
}
|
||||
|
||||
// Optionally prevent default --target if specified in test compile-flags.
|
||||
let custom_target = self.props.compile_flags.iter().any(|x| x.starts_with("--target"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user