File tree 2 files changed +13
-0
lines changed
2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -268,6 +268,15 @@ fn main() {
268
268
if let Ok ( host_linker) = env:: var ( "RUSTC_HOST_LINKER" ) {
269
269
cmd. arg ( format ! ( "-Clinker={}" , host_linker) ) ;
270
270
}
271
+
272
+ if let Ok ( s) = env:: var ( "RUSTC_HOST_CRT_STATIC" ) {
273
+ if s == "true" {
274
+ cmd. arg ( "-C" ) . arg ( "target-feature=+crt-static" ) ;
275
+ }
276
+ if s == "false" {
277
+ cmd. arg ( "-C" ) . arg ( "target-feature=-crt-static" ) ;
278
+ }
279
+ }
271
280
}
272
281
273
282
if env:: var_os ( "RUSTC_PARALLEL_QUERIES" ) . is_some ( ) {
Original file line number Diff line number Diff line change @@ -842,6 +842,10 @@ impl<'a> Builder<'a> {
842
842
cargo. env ( "RUSTC_CRT_STATIC" , x. to_string ( ) ) ;
843
843
}
844
844
845
+ if let Some ( x) = self . crt_static ( compiler. host ) {
846
+ cargo. env ( "RUSTC_HOST_CRT_STATIC" , x. to_string ( ) ) ;
847
+ }
848
+
845
849
// Enable usage of unstable features
846
850
cargo. env ( "RUSTC_BOOTSTRAP" , "1" ) ;
847
851
self . add_rust_test_threads ( & mut cargo) ;
You can’t perform that action at this time.
0 commit comments