@@ -1131,19 +1131,6 @@ struct Compiletest {
11311131 compare_mode : Option < & ' static str > ,
11321132}
11331133
1134- impl Compiletest {
1135- fn add_lld_flags ( builder : & Builder < ' _ > , target : TargetSelection , flags : & mut Vec < String > ) {
1136- if builder. config . use_lld {
1137- if builder. is_fuse_ld_lld ( target) {
1138- flags. push ( "-Clink-arg=-fuse-ld=lld" . to_string ( ) ) ;
1139- }
1140-
1141- let threads = if target. contains ( "windows" ) { "/threads:1" } else { "--threads=1" } ;
1142- flags. push ( format ! ( "-Clink-arg=-Wl,{}" , threads) ) ;
1143- }
1144- }
1145- }
1146-
11471134impl Step for Compiletest {
11481135 type Output = ( ) ;
11491136
@@ -1289,12 +1276,12 @@ note: if you're sure you want to do this, please open an issue as to why. In the
12891276
12901277 let mut hostflags = flags. clone ( ) ;
12911278 hostflags. push ( format ! ( "-Lnative={}" , builder. test_helpers_out( compiler. host) . display( ) ) ) ;
1292- Self :: add_lld_flags ( builder, compiler. host , & mut hostflags ) ;
1279+ hostflags . extend ( builder. lld_flags ( compiler. host ) ) ;
12931280 cmd. arg ( "--host-rustcflags" ) . arg ( hostflags. join ( " " ) ) ;
12941281
12951282 let mut targetflags = flags;
12961283 targetflags. push ( format ! ( "-Lnative={}" , builder. test_helpers_out( target) . display( ) ) ) ;
1297- Self :: add_lld_flags ( builder, target, & mut targetflags ) ;
1284+ targetflags . extend ( builder. lld_flags ( target) ) ;
12981285 cmd. arg ( "--target-rustcflags" ) . arg ( targetflags. join ( " " ) ) ;
12991286
13001287 cmd. arg ( "--docck-python" ) . arg ( builder. python ( ) ) ;
0 commit comments