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 @@ -1096,6 +1096,10 @@ impl<'test> TestCx<'test> {
1096
1096
self . config . target . contains ( "vxworks" ) && !self . is_vxworks_pure_static ( )
1097
1097
}
1098
1098
1099
+ fn has_aux_dir ( & self ) -> bool {
1100
+ !self . props . aux . builds . is_empty ( ) || !self . props . aux . crates . is_empty ( )
1101
+ }
1102
+
1099
1103
fn aux_output_dir ( & self ) -> PathBuf {
1100
1104
let aux_dir = self . aux_output_dir_name ( ) ;
1101
1105
@@ -1649,7 +1653,11 @@ impl<'test> TestCx<'test> {
1649
1653
}
1650
1654
1651
1655
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
+ }
1653
1661
}
1654
1662
1655
1663
rustc. args ( & self . props . compile_flags ) ;
You can’t perform that action at this time.
0 commit comments