Skip to content

Commit 9e2d02a

Browse files
committed
Remap debuginfo for all crates.
1 parent 55caf1d commit 9e2d02a

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

src/bootstrap/bin/rustc.rs

+3-13
Original file line numberDiff line numberDiff line change
@@ -287,10 +287,6 @@ fn main() {
287287
cmd.arg("-C").arg("target-feature=-crt-static");
288288
}
289289
}
290-
291-
if let Ok(map) = env::var("RUSTC_DEBUGINFO_MAP") {
292-
cmd.arg("--remap-path-prefix").arg(&map);
293-
}
294290
} else {
295291
// Override linker if necessary.
296292
if let Ok(host_linker) = env::var("RUSTC_HOST_LINKER") {
@@ -305,16 +301,10 @@ fn main() {
305301
cmd.arg("-C").arg("target-feature=-crt-static");
306302
}
307303
}
304+
}
308305

309-
let crate_type = args.windows(2)
310-
.find(|w| &*w[0] == "--crate-type")
311-
.and_then(|w| w[1].to_str());
312-
313-
if let Some("proc-macro") = crate_type {
314-
if let Ok(map) = env::var("RUSTC_DEBUGINFO_MAP") {
315-
cmd.arg("--remap-path-prefix").arg(&map);
316-
}
317-
}
306+
if let Ok(map) = env::var("RUSTC_DEBUGINFO_MAP") {
307+
cmd.arg("--remap-path-prefix").arg(&map);
318308
}
319309

320310
// Force all crates compiled by this compiler to (a) be unstable and (b)

0 commit comments

Comments
 (0)