From 16c71886c9ed143a22890f99c59deea37b157fa8 Mon Sep 17 00:00:00 2001 From: Simonas Kazlauskas Date: Sun, 14 Feb 2021 17:12:14 +0200 Subject: 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 --- compiler/rustc_session/src/config.rs | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'compiler/rustc_session/src') diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index 210dbb0ee99..86a1f1b7adb 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -667,17 +667,6 @@ impl OutputFilenames { path } - /// Returns the name of the Split DWARF file - this can differ depending on which Split DWARF - /// mode is being used, which is the logic that this function is intended to encapsulate. - pub fn split_dwarf_filename( - &self, - split_debuginfo_kind: SplitDebuginfo, - cgu_name: Option<&str>, - ) -> Option { - self.split_dwarf_path(split_debuginfo_kind, cgu_name) - .map(|path| path.strip_prefix(&self.out_directory).unwrap_or(&path).to_path_buf()) - } - /// Returns the path for the Split DWARF file - this can differ depending on which Split DWARF /// mode is being used, which is the logic that this function is intended to encapsulate. pub fn split_dwarf_path( -- cgit 1.4.1-3-g733a5