Apply path remapping to DW_AT_GNU_dwo_name
This commit is contained in:
parent
efec545293
commit
e5796c46de
2 changed files with 16 additions and 4 deletions
|
@ -1057,9 +1057,12 @@ pub fn compile_unit_metadata(
|
||||||
let output_filenames = tcx.output_filenames(());
|
let output_filenames = tcx.output_filenames(());
|
||||||
let out_dir = &output_filenames.out_directory;
|
let out_dir = &output_filenames.out_directory;
|
||||||
let split_name = if tcx.sess.target_can_use_split_dwarf() {
|
let split_name = if tcx.sess.target_can_use_split_dwarf() {
|
||||||
output_filenames
|
output_filenames.split_dwarf_path(tcx.sess.split_debuginfo(), Some(codegen_unit_name)).map(
|
||||||
.split_dwarf_path(tcx.sess.split_debuginfo(), Some(codegen_unit_name))
|
|f| {
|
||||||
.map(|f| out_dir.join(f))
|
let joined = out_dir.join(f);
|
||||||
|
tcx.sess.source_map().path_mapping().map_prefix(joined).0
|
||||||
|
},
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,16 @@
|
||||||
|
|
||||||
# only-linux
|
# only-linux
|
||||||
|
|
||||||
all:
|
all: packed remapped
|
||||||
|
|
||||||
|
remapped:
|
||||||
|
$(RUSTC) -Z unstable-options -C split-debuginfo=packed -C debuginfo=2 --remap-path-prefix $$PWD= foo.rs -g
|
||||||
|
objdump -Wi $(TMPDIR)/foo | grep $$PWD && exit 1 || exit 0
|
||||||
|
|
||||||
|
$(RUSTC) -Z unstable-options -C split-debuginfo=unpacked -C debuginfo=2 --remap-path-prefix $$PWD= foo.rs -g
|
||||||
|
objdump -Wi $(TMPDIR)/foo | grep $$PWD && exit 1 || exit 0
|
||||||
|
|
||||||
|
packed:
|
||||||
$(RUSTC) -Z unstable-options -C split-debuginfo=packed -C debuginfo=2 foo.rs -g
|
$(RUSTC) -Z unstable-options -C split-debuginfo=packed -C debuginfo=2 foo.rs -g
|
||||||
rm $(TMPDIR)/foo.dwp
|
rm $(TMPDIR)/foo.dwp
|
||||||
rm $(TMPDIR)/$(call BIN,foo)
|
rm $(TMPDIR)/$(call BIN,foo)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue