-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rustc_codegen_llvm: don't generate any type debuginfo for -Cdebuginfo=1. #69080
rustc_codegen_llvm: don't generate any type debuginfo for -Cdebuginfo=1. #69080
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
440e474
to
bcfddd9
Compare
I've removed the commit with the FIXMEs, and I think we can just land this PR as-is. @nagisa @hanna-kruppe Do either of you want to review this? |
📌 Commit bcfddd9b883f1b19f5aca7ce450fed22ca4cd355 has been approved by |
⌛ Testing commit bcfddd9b883f1b19f5aca7ce450fed22ca4cd355 with merge 64c5abdf57876e69861591d6ad757ffa4dd7a76c... |
💔 Test failed - checks-azure |
bcfddd9
to
b5e78a2
Compare
@bors r=michaelwoerister |
📌 Commit b5e78a2 has been approved by |
⌛ Testing commit b5e78a2 with merge 81459fe37234126246a4d483866b171936defc2f... |
@bors retry |
Rollup of 8 pull requests Successful merges: - rust-lang#69080 (rustc_codegen_llvm: don't generate any type debuginfo for -Cdebuginfo=1.) - rust-lang#69940 (librustc_codegen_llvm: Replace deprecated API usage) - rust-lang#69942 (Increase verbosity when suggesting subtle code changes) - rust-lang#69968 (rustc: keep upvars tupled in {Closure,Generator}Substs.) - rust-lang#70123 (Ensure LLVM is in the link path for rustc tools) - rust-lang#70159 (Update the bundled wasi-libc with libstd) - rust-lang#70233 (resolve: Do not resolve visibilities on proc macro definitions twice) - rust-lang#70286 (Miri error type: remove UbExperimental variant) Failed merges: r? @ghost
Works towards #69074 by adding more checks for
DebugInfo::Full
in a few places inrustc_codegen_llvm
, bringing us in line with whatclang -g1
generates (no debuginfo types, nor debuginfo forstatic
s).My local build's (
debuginfo-level=1
,debug-assertions=1
)librustc_driver-*.so
went from just over 1GiB (1019MiB) down to 402MiB.It's still bad, but the
.debug_*
sections themselves (as reported byobjdump
) went from something like 853MiB down to 236MiB, i.e. roughly a 3.6x reduction.Sadly, I don't think this is enough to justify shipping all of this debuginfo, but now it's more plausible that we could at least build with
debuginfo-level=1
then strip it.That would give us real backtraces for e.g. ICEs during builds, but I don't know how often that's relevant.
We could also look into split DWARF, and maybe have a
rustc-debuginfo
component inrustup
.There's also the possibility of making it slimmer by omitting parameters to functions, or perhaps some deduplication (I think right now there is no DWARF reuse across CGUs? maybe ThinLTO helps?).
r? @michaelwoerister cc @rust-lang/wg-codegen @alexcrichton @Mark-Simulacrum