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 @@ -268,6 +268,15 @@ fn main() {
268268 if let Ok ( host_linker) = env:: var ( "RUSTC_HOST_LINKER" ) {
269269 cmd. arg ( format ! ( "-Clinker={}" , host_linker) ) ;
270270 }
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+ }
271280 }
272281
273282 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> {
842842 cargo. env ( "RUSTC_CRT_STATIC" , x. to_string ( ) ) ;
843843 }
844844
845+ if let Some ( x) = self . crt_static ( compiler. host ) {
846+ cargo. env ( "RUSTC_HOST_CRT_STATIC" , x. to_string ( ) ) ;
847+ }
848+
845849 // Enable usage of unstable features
846850 cargo. env ( "RUSTC_BOOTSTRAP" , "1" ) ;
847851 self . add_rust_test_threads ( & mut cargo) ;
You can’t perform that action at this time.
0 commit comments