diff options
| author | Simonas Kazlauskas <git@kazlauskas.me> | 2021-02-14 17:12:14 +0200 |
|---|---|---|
| committer | Simonas Kazlauskas <git@kazlauskas.me> | 2021-02-14 17:12:14 +0200 |
| commit | 16c71886c9ed143a22890f99c59deea37b157fa8 (patch) | |
| tree | 2f9bab15b8902a932ff3d59adaa6b3211852c4b4 /compiler/rustc_codegen_llvm/src/back/write.rs | |
| parent | 3158857297417566824631a85c4cb3c0615ec6c2 (diff) | |
| download | rust-16c71886c9ed143a22890f99c59deea37b157fa8.tar.gz rust-16c71886c9ed143a22890f99c59deea37b157fa8.zip | |
Set path of the compile unit to the source directory
As part of the effort to implement split dwarf debug info, we ended up setting the compile unit location to the output directory rather than the source directory. Furthermore, it seems like we failed to remap the prefixes for this as well! The desired behaviour is to instead set the `DW_AT_GNU_dwo_name` to a path relative to compiler's working directory. This still allows debuggers to find the split dwarf files, while not changing the behaviour of the code that is compiling with regular debug info, and not changing the compiler's behaviour with regards to reproducibility. Fixes #82074
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/back/write.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/back/write.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/back/write.rs b/compiler/rustc_codegen_llvm/src/back/write.rs index 8b737c9a2e5..8d945709da4 100644 --- a/compiler/rustc_codegen_llvm/src/back/write.rs +++ b/compiler/rustc_codegen_llvm/src/back/write.rs @@ -93,7 +93,7 @@ pub fn create_informational_target_machine(sess: &Session) -> &'static mut llvm: pub fn create_target_machine(tcx: TyCtxt<'_>, mod_name: &str) -> &'static mut llvm::TargetMachine { let split_dwarf_file = if tcx.sess.target_can_use_split_dwarf() { tcx.output_filenames(LOCAL_CRATE) - .split_dwarf_filename(tcx.sess.split_debuginfo(), Some(mod_name)) + .split_dwarf_path(tcx.sess.split_debuginfo(), Some(mod_name)) } else { None }; |
