diff options
| -rw-r--r-- | src/bootstrap/bin/rustc.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs index 54b689fb062..c524cf646dd 100644 --- a/src/bootstrap/bin/rustc.rs +++ b/src/bootstrap/bin/rustc.rs @@ -305,6 +305,16 @@ fn main() { cmd.arg("-C").arg("target-feature=-crt-static"); } } + + let crate_type = args.windows(2) + .find(|w| &*w[0] == "--crate-type") + .and_then(|w| w[1].to_str()); + + if let Some("proc-macro") = crate_type { + 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) |
