diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-08-17 03:02:59 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-17 03:02:59 +0200 |
| commit | 786aaf0f64789921e728b108e4935121aa3d549d (patch) | |
| tree | 717ffb4fe81c65f2e10bf0a02c5f1053c0ff59c0 /src | |
| parent | 13b103139990b4b1a556e4d0a559ce829e641cc6 (diff) | |
| parent | 9e2d02a1a1c657fece7ed4f5c71fbdf484931ddc (diff) | |
| download | rust-786aaf0f64789921e728b108e4935121aa3d549d.tar.gz rust-786aaf0f64789921e728b108e4935121aa3d549d.zip | |
Rollup merge of #63558 - jgalenson:move-remap, r=alexcrichton
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. I'm not completely sure if this is the best way to do this, but to get reproducible builds we need librustc_macros to be built with --remap-path-prefix. I was previously modifying Cargo to pass that argument to all child crates, so this seems simpler and more correct. I did not add a test since there do not seem to be any existing tests for RUSTC_DEBUGINFO_MAP. r? @alexcrichton
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/bin/rustc.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs index 9c01de8aa82..2b2dfb8a196 100644 --- a/src/bootstrap/bin/rustc.rs +++ b/src/bootstrap/bin/rustc.rs @@ -276,10 +276,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") { @@ -296,6 +292,10 @@ fn main() { } } + 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 |
