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-04-29 11:30:56 +0200
commitec2b861c2f8013e10ab1f6e01c9aed9ad1daaefe (patch)
tree5f6bac64dd3f396d419baea312dd6500057648aa /src/bootstrap/bin
parent5ecf29df052c7eca10fccc96f4179d338fe0014e (diff)
downloadrust-ec2b861c2f8013e10ab1f6e01c9aed9ad1daaefe.tar.gz
rust-ec2b861c2f8013e10ab1f6e01c9aed9ad1daaefe.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 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() {