Rollup merge of #91566 - cbeuw:remap-dwo-name, r=davidtwco
Apply path remapping to DW_AT_GNU_dwo_name when producing split DWARF `--remap-path-prefix` doesn't apply to paths to `.o` (in case of packed) or `.dwo` (in case of unpacked) files in `DW_AT_GNU_dwo_name`. GCC also has this bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91888
This commit is contained in:
commit
1c42199c8f
4 changed files with 31 additions and 10 deletions
|
@ -205,8 +205,11 @@ pub fn target_machine_factory(
|
|||
let use_init_array =
|
||||
!sess.opts.debugging_opts.use_ctors_section.unwrap_or(sess.target.use_ctors_section);
|
||||
|
||||
let path_mapping = sess.source_map().path_mapping().clone();
|
||||
|
||||
Arc::new(move |config: TargetMachineFactoryConfig| {
|
||||
let split_dwarf_file = config.split_dwarf_file.unwrap_or_default();
|
||||
let split_dwarf_file =
|
||||
path_mapping.map_prefix(config.split_dwarf_file.unwrap_or_default()).0;
|
||||
let split_dwarf_file = CString::new(split_dwarf_file.to_str().unwrap()).unwrap();
|
||||
|
||||
let tm = unsafe {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue