Auto merge of #82102 - nagisa:nagisa/fix-dwo-name, r=davidtwco
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 cc `@alexcrichton` `@davidtwco`
This commit is contained in:
commit
446d4533e8
8 changed files with 26 additions and 22 deletions
|
@ -288,7 +288,7 @@ impl TargetMachineFactoryConfig {
|
|||
module_name: &str,
|
||||
) -> TargetMachineFactoryConfig {
|
||||
let split_dwarf_file = if cgcx.target_can_use_split_dwarf {
|
||||
cgcx.output_filenames.split_dwarf_filename(cgcx.split_debuginfo, Some(module_name))
|
||||
cgcx.output_filenames.split_dwarf_path(cgcx.split_debuginfo, Some(module_name))
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue