summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2019-08-15 13:57:09 -0700
committerAlex Crichton <alex@alexcrichton.com>2019-09-23 09:34:44 -0700
commitac29809940ca0d1ffb864975fea2d61a3d649b8d (patch)
tree300530737b5f442884c87171e4b18d3fedd35786 /src/bootstrap
parent04cb0653a8c3577ed43bb2e365582be227be4d00 (diff)
downloadrust-ac29809940ca0d1ffb864975fea2d61a3d649b8d.tar.gz
rust-ac29809940ca0d1ffb864975fea2d61a3d649b8d.zip
bootstrap: Move `RUSTC_CRT_STATIC` to `builder.rs`
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/bin/rustc.rs9
-rw-r--r--src/bootstrap/builder.rs6
2 files changed, 7 insertions, 8 deletions
diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs
index 60f4b98d9d8..c6ac03baefd 100644
--- a/src/bootstrap/bin/rustc.rs
+++ b/src/bootstrap/bin/rustc.rs
@@ -232,13 +232,8 @@ fn main() {
             }
         }
 
-        if let Ok(s) = env::var("RUSTC_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 let Ok(map) = env::var("RUSTC_DEBUGINFO_MAP") {
+            cmd.arg("--remap-path-prefix").arg(&map);
         }
     } else {
         // Override linker if necessary.
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index 3995ab170d1..e25c4d065cf 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
@@ -945,7 +945,11 @@ impl<'a> Builder<'a> {
         }
 
         if let Some(x) = self.crt_static(target) {
-            cargo.env("RUSTC_CRT_STATIC", x.to_string());
+            if x {
+                rustflags.arg("-Ctarget-feature=+crt-static");
+            } else {
+                rustflags.arg("-Ctarget-feature=-crt-static");
+            }
         }
 
         if let Some(x) = self.crt_static(compiler.host) {