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 @@ -2135,6 +2135,10 @@ impl<'test> TestCx<'test> {
2135
2135
self . config . target . contains ( "vxworks" ) && !self . is_vxworks_pure_static ( )
2136
2136
}
2137
2137
2138
+ fn has_aux_dir ( & self ) -> bool {
2139
+ !self . props . aux_builds . is_empty ( ) || !self . props . aux_crates . is_empty ( )
2140
+ }
2141
+
2138
2142
fn build_all_auxiliary ( & self , rustc : & mut Command ) -> PathBuf {
2139
2143
let aux_dir = self . aux_output_dir_name ( ) ;
2140
2144
@@ -2612,7 +2616,11 @@ impl<'test> TestCx<'test> {
2612
2616
}
2613
2617
2614
2618
if let LinkToAux :: Yes = link_to_aux {
2615
- rustc. arg ( "-L" ) . arg ( self . aux_output_dir_name ( ) ) ;
2619
+ // if we pass an `-L` argument to a directory that doesn't exist,
2620
+ // macOS ld emits warnings which disrupt the .stderr files
2621
+ if self . has_aux_dir ( ) {
2622
+ rustc. arg ( "-L" ) . arg ( self . aux_output_dir_name ( ) ) ;
2623
+ }
2616
2624
}
2617
2625
2618
2626
rustc. args ( & self . props . compile_flags ) ;
You can’t perform that action at this time.
0 commit comments