File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
src/tools/compiletest/src Expand file tree Collapse file tree 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> {
17781778 self . config . target . contains ( "vxworks" ) && !self . is_vxworks_pure_static ( )
17791779 }
17801780
1781+ fn has_aux_dir ( & self ) -> bool {
1782+ !self . props . aux_builds . is_empty ( ) || !self . props . aux_crates . is_empty ( )
1783+ }
1784+
17811785 fn aux_output_dir ( & self ) -> PathBuf {
17821786 let aux_dir = self . aux_output_dir_name ( ) ;
17831787
@@ -2324,7 +2328,11 @@ impl<'test> TestCx<'test> {
23242328 }
23252329
23262330 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+ }
23282336 }
23292337
23302338 rustc. args ( & self . props . compile_flags ) ;
You can’t perform that action at this time.
0 commit comments