rust/compiler/rustc_session/src
David Wood ee073b5ec5
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>
2020-12-16 10:33:52 +00:00
..
cgu_reuse_tracker.rs
code_stats.rs
config.rs cg_llvm: split dwarf filename and comp dir 2020-12-16 10:33:52 +00:00
filesearch.rs Dogfood {exclusive,half-open} ranges in compiler (nfc) 2020-10-28 20:09:20 -07:00
lib.rs Dogfood 'str_split_once() with compiler/ 2020-12-07 12:48:44 -07:00
options.rs session: add split-dwarf flag 2020-12-16 10:33:38 +00:00
output.rs Collapse all uses of target.options.foo into target.foo 2020-11-08 17:29:13 +03:00
parse.rs Rollup merge of #79005 - petrochenkov:noinjected, r=davidtwco 2020-11-15 13:39:46 +01:00
search_paths.rs use strip_prefix over starts_with and manual slicing based on pattern length (clippy::manual_strip) 2020-09-17 10:13:16 +02:00
session.rs fix clippy::{needless_bool, manual_unwrap_or} 2020-12-11 23:02:19 +01:00
utils.rs