From ec2b861c2f8013e10ab1f6e01c9aed9ad1daaefe Mon Sep 17 00:00:00 2001 From: Johannes Nixdorf Date: Sun, 29 Apr 2018 11:21:47 +0200 Subject: bootstrap: pass crt-static for the compiler host as well --- src/bootstrap/bin/rustc.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/bootstrap/bin') diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs index b6ae824c376..05fe7753720 100644 --- a/src/bootstrap/bin/rustc.rs +++ b/src/bootstrap/bin/rustc.rs @@ -261,6 +261,15 @@ fn main() { if let Ok(host_linker) = env::var("RUSTC_HOST_LINKER") { cmd.arg(format!("-Clinker={}", host_linker)); } + + if let Ok(s) = env::var("RUSTC_HOST_CRT_STATIC") { + if s == "true" { + cmd.arg("-C").arg("target-feature=+crt-static"); + } + if s == "false" { + cmd.arg("-C").arg("target-feature=-crt-static"); + } + } } if env::var_os("RUSTC_PARALLEL_QUERIES").is_some() { -- cgit 1.4.1-3-g733a5