Skip to content

Commit

Permalink
Remap debuginfo for all crates.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgalenson committed Aug 14, 2019
1 parent 55caf1d commit 9e2d02a
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions src/bootstrap/bin/rustc.rs
Expand Up @@ -287,10 +287,6 @@ fn main() {
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.
if let Ok(host_linker) = env::var("RUSTC_HOST_LINKER") {
Expand All @@ -305,16 +301,10 @@ 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);
}
}
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)
Expand Down

0 comments on commit 9e2d02a

Please sign in to comment.