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 @@ -1058,6 +1058,10 @@ impl<'test> TestCx<'test> {
10581058 self . config . target . contains ( "vxworks" ) && !self . is_vxworks_pure_static ( )
10591059 }
10601060
1061+ fn has_aux_dir ( & self ) -> bool {
1062+ !self . props . aux_builds . is_empty ( ) || !self . props . aux_crates . is_empty ( )
1063+ }
1064+
10611065 fn aux_output_dir ( & self ) -> PathBuf {
10621066 let aux_dir = self . aux_output_dir_name ( ) ;
10631067
@@ -1612,7 +1616,11 @@ impl<'test> TestCx<'test> {
16121616 }
16131617
16141618 if let LinkToAux :: Yes = link_to_aux {
1615- rustc. arg ( "-L" ) . arg ( self . aux_output_dir_name ( ) ) ;
1619+ // if we pass an `-L` argument to a directory that doesn't exist,
1620+ // macOS ld emits warnings which disrupt the .stderr files
1621+ if self . has_aux_dir ( ) {
1622+ rustc. arg ( "-L" ) . arg ( self . aux_output_dir_name ( ) ) ;
1623+ }
16161624 }
16171625
16181626 rustc. args ( & self . props . compile_flags ) ;
You can’t perform that action at this time.
0 commit comments