-
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
Add a new -Z force-full-debuginfo
flag
#109311
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
@@ -1425,6 +1425,8 @@ options! { | |||
flatten_format_args: bool = (false, parse_bool, [TRACKED], | |||
"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)"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
@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. |
Reviving #83947 seems like a better long-term fix to me. |
…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
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
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