File tree 1 file changed +9
-1
lines changed
src/tools/compiletest/src
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1778,6 +1778,10 @@ impl<'test> TestCx<'test> {
1778
1778
self . config . target . contains ( "vxworks" ) && !self . is_vxworks_pure_static ( )
1779
1779
}
1780
1780
1781
+ fn has_aux_dir ( & self ) -> bool {
1782
+ !self . props . aux_builds . is_empty ( ) || !self . props . aux_crates . is_empty ( )
1783
+ }
1784
+
1781
1785
fn aux_output_dir ( & self ) -> PathBuf {
1782
1786
let aux_dir = self . aux_output_dir_name ( ) ;
1783
1787
@@ -2324,7 +2328,11 @@ impl<'test> TestCx<'test> {
2324
2328
}
2325
2329
2326
2330
if let LinkToAux :: Yes = link_to_aux {
2327
- rustc. arg ( "-L" ) . arg ( self . aux_output_dir_name ( ) ) ;
2331
+ // if we pass an `-L` argument to a directory that doesn't exist,
2332
+ // macOS ld emits warnings which disrupt the .stderr files
2333
+ if self . has_aux_dir ( ) {
2334
+ rustc. arg ( "-L" ) . arg ( self . aux_output_dir_name ( ) ) ;
2335
+ }
2328
2336
}
2329
2337
2330
2338
rustc. args ( & self . props . compile_flags ) ;
You can’t perform that action at this time.
0 commit comments