cg_llvm: split dwarf support by davidtwco · Pull Request #77117 · rust-lang/rust (original) (raw)
Determine whether or not there should be a single
dwo
output from rustc, or one per codegen-unit as exists currently.
What happens when you compile a Cargo package in debug mode, with some dependencies? Debug mode should default to -Cdebuginfo=2
but will also enable -Cincremental
. I expect you'll end up with hundreds of dwo
files.
Would be nice if it were possible to combine the files cheaply, as managing one dwo
file seems easier (for distros, or even rustup
, if we e.g. want to add a rustc-debuginfo
component that has at least -Cdebuginfo=1
for better backtraces).
Other than this, this PR is great! I remember how much better using split DWARF was when compiling LLVM in debug mode.
It also reminds me that I want to eventually look at perhaps deduplicating some of the DWARF definitions (which get duplicated through instantiation in separate CGUs), and being able to operate on the dwo
separately from the rest of the binary should help.