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 @@ -261,6 +261,15 @@ fn main() {
261
261
if let Ok ( host_linker) = env:: var ( "RUSTC_HOST_LINKER" ) {
262
262
cmd. arg ( format ! ( "-Clinker={}" , host_linker) ) ;
263
263
}
264
+
265
+ if let Ok ( s) = env:: var ( "RUSTC_HOST_CRT_STATIC" ) {
266
+ if s == "true" {
267
+ cmd. arg ( "-C" ) . arg ( "target-feature=+crt-static" ) ;
268
+ }
269
+ if s == "false" {
270
+ cmd. arg ( "-C" ) . arg ( "target-feature=-crt-static" ) ;
271
+ }
272
+ }
264
273
}
265
274
266
275
if env:: var_os ( "RUSTC_PARALLEL_QUERIES" ) . is_some ( ) {
Original file line number Diff line number Diff line change @@ -663,6 +663,10 @@ impl<'a> Builder<'a> {
663
663
cargo. env ( "RUSTC_CRT_STATIC" , x. to_string ( ) ) ;
664
664
}
665
665
666
+ if let Some ( x) = self . crt_static ( compiler. host ) {
667
+ cargo. env ( "RUSTC_HOST_CRT_STATIC" , x. to_string ( ) ) ;
668
+ }
669
+
666
670
// Enable usage of unstable features
667
671
cargo. env ( "RUSTC_BOOTSTRAP" , "1" ) ;
668
672
self . add_rust_test_threads ( & mut cargo) ;
You can’t perform that action at this time.
0 commit comments