This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit ee073b5
committed
cg_llvm: split dwarf filename and comp dir
llvm-dwp concatenates `DW_AT_comp_dir` with `DW_AT_GNU_dwo_name` (only
when `DW_AT_comp_dir` exists), which can result in it failing to find
the DWARF object files.
In earlier testing, `DW_AT_comp_dir` wasn't present in the final
object and the current directory was the output directory.
When running tests through compiletest, the working directory of the
compilation is different from output directory and that resulted in
`DW_AT_comp_dir` being in the object file (and set to the current
working directory, rather than the output directory), and
`DW_AT_GNU_dwo_name` being set to the full path (rather than just
the filename), so llvm-dwp was failing.
This commit changes the compilation directory provided to LLVM to match
the output directory, where DWARF objects are output; and ensures that
only the filename is used for `DW_AT_GNU_dwo_name`.
Signed-off-by: David Wood <david@davidtw.co>1 parent 99ad915 commit ee073b5
File tree
5 files changed
+21
-8
lines changed- compiler
- rustc_codegen_llvm/src
- back
- debuginfo
- rustc_session/src
5 files changed
+21
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
734 | 734 | | |
735 | 735 | | |
736 | 736 | | |
737 | | - | |
| 737 | + | |
738 | 738 | | |
739 | 739 | | |
740 | 740 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
993 | 993 | | |
994 | 994 | | |
995 | 995 | | |
996 | | - | |
997 | 996 | | |
| 997 | + | |
| 998 | + | |
998 | 999 | | |
999 | 1000 | | |
1000 | | - | |
| 1001 | + | |
1001 | 1002 | | |
| 1003 | + | |
1002 | 1004 | | |
1003 | 1005 | | |
1004 | 1006 | | |
| |||
1024 | 1026 | | |
1025 | 1027 | | |
1026 | 1028 | | |
1027 | | - | |
1028 | | - | |
| 1029 | + | |
| 1030 | + | |
1029 | 1031 | | |
1030 | 1032 | | |
1031 | 1033 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
359 | | - | |
| 359 | + | |
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
617 | 617 | | |
618 | 618 | | |
619 | 619 | | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
620 | 631 | | |
621 | 632 | | |
622 | | - | |
| 633 | + | |
623 | 634 | | |
624 | 635 | | |
625 | 636 | | |
| |||
0 commit comments