Add a new -Z force-full-debuginfo flag#109311
Closed
jyn514 wants to merge 1 commit intorust-lang:masterfrom
Closed
Add a new -Z force-full-debuginfo flag#109311jyn514 wants to merge 1 commit intorust-lang:masterfrom
-Z force-full-debuginfo flag#109311jyn514 wants to merge 1 commit intorust-lang:masterfrom
Conversation
This comment has been minimized.
This comment has been minimized.
Apparently firefox depends on the current behavior that adds too much debuginfo, but that doesn't mean we need to force it on for rustc itself. Add a new unstable flag for turning it off.
51b891c to
eb34b82
Compare
bjorn3
reviewed
Mar 19, 2023
| "flatten nested format_args!() and literals into a simplified format_args!() call \ | ||
| (default: no)"), | ||
| force_full_debuginfo: bool = (true, parse_bool, [TRACKED], | ||
| "force all codegen-units to have full debuginfo even for -C debuginfo=1. see #64405 (default: yes)"), |
Member
There was a problem hiding this comment.
This is not entirely correct. It merely causes more debuginfo to be added, not everything. For example function arguments aren't added to the debuginfo. Just basic things like the linkage name and demangled function name.
Member
Author
|
@michaelwoerister mentioned on Zulip that #83947 already has an approved FCP exposing this as a stable option - happy to rebase that PR if you'd prefer. |
Member
|
Reviving #83947 seems like a better long-term fix to me. |
Member
Author
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 4, 2023
…oerister Extend -Cdebuginfo with new options and named aliases This is a rebase of rust-lang#83947, along with my best guess at what the new options mean. I tried to follow the LLVM source code to get a better idea but ran into quite a lot of trouble (https://rust-lang.zulipchat.com/#narrow/stream/187780-t-compiler.2Fwg-llvm/topic/go-to-definition.20in.20src.2Fllvm-project.3F). The description for the original PR follows below. Note that the changes in this PR have already been through FCP: rust-lang#83947 (comment) Closes rust-lang#109311. Helps with rust-lang#104968. r? `@michaelwoerister` cc `@cuviper` --- The -Cdebuginfo=1 option was never line tables only and can't be due to backwards compatibility issues. This was clarified and an option for emitting line tables only was added. Additionally an option for emitting line info directives only was added, which is needed for some targets, i.e. nvptx. The debug info options should now behave similarly to clang's debug info options. Fix rust-lang#60020 Fix rust-lang#64405
saethlin
pushed a commit
to saethlin/miri
that referenced
this pull request
Apr 10, 2023
Extend -Cdebuginfo with new options and named aliases This is a rebase of rust-lang/rust#83947, along with my best guess at what the new options mean. I tried to follow the LLVM source code to get a better idea but ran into quite a lot of trouble (https://rust-lang.zulipchat.com/#narrow/stream/187780-t-compiler.2Fwg-llvm/topic/go-to-definition.20in.20src.2Fllvm-project.3F). The description for the original PR follows below. Note that the changes in this PR have already been through FCP: rust-lang/rust#83947 (comment) Closes rust-lang/rust#109311. Helps with rust-lang/rust#104968. r? `@michaelwoerister` cc `@cuviper` --- The -Cdebuginfo=1 option was never line tables only and can't be due to backwards compatibility issues. This was clarified and an option for emitting line tables only was added. Additionally an option for emitting line info directives only was added, which is needed for some targets, i.e. nvptx. The debug info options should now behave similarly to clang's debug info options. Fix rust-lang/rust#60020 Fix rust-lang/rust#64405
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.
Apparently firefox depends on the current behavior that adds too much debuginfo, but that doesn't mean we need to force it on for rustc itself. Add a new unstable flag for turning it off.
cc #104968, #64405
r? @cuviper