about summary refs log tree commit diff
path: root/src/bootstrap/bin
diff options
context:
space:
mode:
authorJohannes Nixdorf <mixi@exherbo.org>2018-04-29 11:21:47 +0200
committerJohannes Nixdorf <mixi@exherbo.org>2018-05-31 12:01:50 +0200
commit55dab7c82018101709de8cb986cede87effbb50d (patch)
treebd223eff64914523836221ce06ceb709384ab400 /src/bootstrap/bin
parentbcab14af3eebc51f80af8d77af92fbf92d8240f9 (diff)
downloadrust-55dab7c82018101709de8cb986cede87effbb50d.tar.gz
rust-55dab7c82018101709de8cb986cede87effbb50d.zip
bootstrap: pass crt-static for the compiler host as well
Diffstat (limited to 'src/bootstrap/bin')
-rw-r--r--src/bootstrap/bin/rustc.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs
index 6f27402233f..4607ca5cf9f 100644
--- a/src/bootstrap/bin/rustc.rs
+++ b/src/bootstrap/bin/rustc.rs
@@ -268,6 +268,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() {