rustc_codegen_llvm: don't generate any type debuginfo for -Cdebuginfo=1.#69080
Merged
bors merged 4 commits intorust-lang:masterfrom Mar 23, 2020
Merged
Conversation
bjorn3
reviewed
Feb 12, 2020
Member
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
440e474 to
bcfddd9
Compare
Member
Author
|
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? |
Member
Collaborator
|
📌 Commit bcfddd9b883f1b19f5aca7ce450fed22ca4cd355 has been approved by |
Collaborator
|
⌛ Testing commit bcfddd9b883f1b19f5aca7ce450fed22ca4cd355 with merge 64c5abdf57876e69861591d6ad757ffa4dd7a76c... |
Collaborator
|
💔 Test failed - checks-azure |
bcfddd9 to
b5e78a2
Compare
Member
Author
|
@bors r=michaelwoerister |
Collaborator
|
📌 Commit b5e78a2 has been approved by |
Collaborator
|
⌛ Testing commit b5e78a2 with merge 81459fe37234126246a4d483866b171936defc2f... |
Contributor
|
@bors retry |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 23, 2020
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
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Works towards #69074 by adding more checks for
DebugInfo::Fullin a few places inrustc_codegen_llvm, bringing us in line with whatclang -g1generates (no debuginfo types, nor debuginfo forstatics).My local build's (
debuginfo-level=1,debug-assertions=1)librustc_driver-*.sowent 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=1then 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-debuginfocomponent 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