diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs index 60f4b98d9d84..c6ac03baefd8 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 3995ab170d12..e25c4d065cfd 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) {