| diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs |
| index 595deb07e..dcd91ddc7 100644 |
| --- a/src/bootstrap/bin/rustc.rs |
| +++ b/src/bootstrap/bin/rustc.rs |
| @@ -285,10 +285,6 @@ fn main() { |
| cmd.arg("-Zmir-opt-level=0"); |
| } |
| } |
| - |
| - if let Ok(map) = env::var("RUSTC_DEBUGINFO_MAP") { |
| - cmd.arg("--remap-path-prefix").arg(&map); |
| - } |
| } else { |
| // Override linker if necessary. |
| if let Ok(host_linker) = env::var("RUSTC_HOST_LINKER") { |
| @@ -308,6 +304,10 @@ fn main() { |
| // This is required for internal lints. |
| cmd.arg("-Zunstable-options"); |
| |
| + if let Ok(map) = env::var("RUSTC_DEBUGINFO_MAP") { |
| + cmd.arg("--remap-path-prefix").arg(&map); |
| + } |
| + |
| // Force all crates compiled by this compiler to (a) be unstable and (b) |
| // allow the `rustc_private` feature to link to other unstable crates |
| // also in the sysroot. We also do this for host crates, since those |