diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2018-08-30 10:25:07 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2018-09-10 10:10:38 -0700 |
| commit | 5595aeb6b7eda6b96cb2fe882401213c4fc04c6f (patch) | |
| tree | c8441baefb29564effd126f431c8ee4e21f98bb5 /src/bootstrap/bin | |
| parent | fc81e36242ddddb7149a0d1ca44ebce7fb9eef8a (diff) | |
| download | rust-5595aeb6b7eda6b96cb2fe882401213c4fc04c6f.tar.gz rust-5595aeb6b7eda6b96cb2fe882401213c4fc04c6f.zip | |
Add rustc SHA to released DWARF debuginfo
This commit updates the debuginfo that is encoded in all of our released artifacts by default. Currently it has paths like `/checkout/src/...` but these are a little inconsistent and have changed over time. This commit instead attempts to actually define the file paths in our debuginfo to be consistent between releases. All debuginfo paths are now intended to be `/rustc/$sha` where `$sha` is the git sha of the released compiler. Sub-paths are all paths into the git repo at that `$sha`.
Diffstat (limited to 'src/bootstrap/bin')
| -rw-r--r-- | src/bootstrap/bin/rustc.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs index 7192cae8956..f30f34acf5c 100644 --- a/src/bootstrap/bin/rustc.rs +++ b/src/bootstrap/bin/rustc.rs @@ -263,6 +263,10 @@ fn main() { if env::var_os("RUSTC_FORCE_UNSTABLE").is_some() { cmd.arg("-Z").arg("force-unstable-if-unmarked"); } + + 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") { |
