Remap paths for proc-macro crates.
The remap-debuginfo config option remaps paths in most crates, but it does not apply to proc-macros, so they are still non-reproducible. This patch fixes that.
This commit is contained in:
parent
c01be67ea4
commit
55caf1dcd3
1 changed files with 10 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue