@@ -1131,19 +1131,6 @@ struct Compiletest {
1131
1131
compare_mode : Option < & ' static str > ,
1132
1132
}
1133
1133
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
-
1147
1134
impl Step for Compiletest {
1148
1135
type Output = ( ) ;
1149
1136
@@ -1289,12 +1276,12 @@ note: if you're sure you want to do this, please open an issue as to why. In the
1289
1276
1290
1277
let mut hostflags = flags. clone ( ) ;
1291
1278
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 ) ) ;
1293
1280
cmd. arg ( "--host-rustcflags" ) . arg ( hostflags. join ( " " ) ) ;
1294
1281
1295
1282
let mut targetflags = flags;
1296
1283
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) ) ;
1298
1285
cmd. arg ( "--target-rustcflags" ) . arg ( targetflags. join ( " " ) ) ;
1299
1286
1300
1287
cmd. arg ( "--docck-python" ) . arg ( builder. python ( ) ) ;
0 commit comments