File tree 1 file changed +5
-2
lines changed
src/tools/compiletest/src
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1900,8 +1900,11 @@ impl<'test> TestCx<'test> {
1900
1900
// Use a single thread for efficiency and a deterministic error message order
1901
1901
rustc. arg ( "-Zthreads=1" ) ;
1902
1902
1903
- // In stage 0, make sure we use `stage0-sysroot` instead of the bootstrap sysroot.
1904
- rustc. arg ( "--sysroot" ) . arg ( & self . config . sysroot_base ) ;
1903
+ // Optionally prevent default --sysroot if specified in test compile-flags.
1904
+ if !self . props . compile_flags . iter ( ) . any ( |flag| flag. starts_with ( "--sysroot" ) ) {
1905
+ // In stage 0, make sure we use `stage0-sysroot` instead of the bootstrap sysroot.
1906
+ rustc. arg ( "--sysroot" ) . arg ( & self . config . sysroot_base ) ;
1907
+ }
1905
1908
1906
1909
// Optionally prevent default --target if specified in test compile-flags.
1907
1910
let custom_target = self . props . compile_flags . iter ( ) . any ( |x| x. starts_with ( "--target" ) ) ;
You can’t perform that action at this time.
0 commit comments