File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -261,6 +261,15 @@ fn main() {
261261 if let Ok ( host_linker) = env:: var ( "RUSTC_HOST_LINKER" ) {
262262 cmd. arg ( format ! ( "-Clinker={}" , host_linker) ) ;
263263 }
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+ }
264273 }
265274
266275 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> {
663663 cargo. env ( "RUSTC_CRT_STATIC" , x. to_string ( ) ) ;
664664 }
665665
666+ if let Some ( x) = self . crt_static ( compiler. host ) {
667+ cargo. env ( "RUSTC_HOST_CRT_STATIC" , x. to_string ( ) ) ;
668+ }
669+
666670 // Enable usage of unstable features
667671 cargo. env ( "RUSTC_BOOTSTRAP" , "1" ) ;
668672 self . add_rust_test_threads ( & mut cargo) ;
You can’t perform that action at this time.
0 commit comments