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 @@ -1096,6 +1096,10 @@ impl<'test> TestCx<'test> {
10961096 self . config . target . contains ( "vxworks" ) && !self . is_vxworks_pure_static ( )
10971097 }
10981098
1099+ fn has_aux_dir ( & self ) -> bool {
1100+ !self . props . aux . builds . is_empty ( ) || !self . props . aux . crates . is_empty ( )
1101+ }
1102+
10991103 fn aux_output_dir ( & self ) -> PathBuf {
11001104 let aux_dir = self . aux_output_dir_name ( ) ;
11011105
@@ -1649,7 +1653,11 @@ impl<'test> TestCx<'test> {
16491653 }
16501654
16511655 if let LinkToAux :: Yes = link_to_aux {
1652- rustc. arg ( "-L" ) . arg ( self . aux_output_dir_name ( ) ) ;
1656+ // if we pass an `-L` argument to a directory that doesn't exist,
1657+ // macOS ld emits warnings which disrupt the .stderr files
1658+ if self . has_aux_dir ( ) {
1659+ rustc. arg ( "-L" ) . arg ( self . aux_output_dir_name ( ) ) ;
1660+ }
16531661 }
16541662
16551663 rustc. args ( & self . props . compile_flags ) ;
You can’t perform that action at this time.
0 commit comments