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 @@ -1058,6 +1058,10 @@ impl<'test> TestCx<'test> {
1058
1058
self . config . target . contains ( "vxworks" ) && !self . is_vxworks_pure_static ( )
1059
1059
}
1060
1060
1061
+ fn has_aux_dir ( & self ) -> bool {
1062
+ !self . props . aux_builds . is_empty ( ) || !self . props . aux_crates . is_empty ( )
1063
+ }
1064
+
1061
1065
fn aux_output_dir ( & self ) -> PathBuf {
1062
1066
let aux_dir = self . aux_output_dir_name ( ) ;
1063
1067
@@ -1612,7 +1616,11 @@ impl<'test> TestCx<'test> {
1612
1616
}
1613
1617
1614
1618
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
+ }
1616
1624
}
1617
1625
1618
1626
rustc. args ( & self . props . compile_flags ) ;
You can’t perform that action at this time.
0 commit comments