-
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
Extend -Cdebuginfo
with new options and named aliases
#83947
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @lcnr (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
not something i am familiar with, maybe r? @nagisa |
This overall seems good to me, but it should be accompanied with some tests I think. |
One issue with at the moment is that debug-info tests are not being ran #47163 |
The test could be a codegen test verifying the kind of settings LLVM receives and the kind of debug info statements that do or do not show up in the IR. I suspect, for instance, that the optimized IR does not need to contain any (Also see https://rustc-dev-guide.rust-lang.org/tests/intro.html if you haven't yet) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Sorry for taking so long to take another look at this! This looks great, but there is a test failure that needs to be fixed :( Could you also squash the commits together into 1 or 2 while removing commits such as "Formatting"? Thanks! |
During the meeting we had on Thrusday a number of T-compiler members have expressed that they would like to see an MCP for this change. However given that this is already implemented, we could also run an FCP, wdyt @pnkfelix @michaelwoerister? |
Question: What exactly is "line-directives-only"? |
@jdtatz Ping from triage, CI is still red. Would you mind fixing that? Thanks! |
@jdtatz Ping again from triage, build is still broken. |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. The RFC will be merged soon. |
068c479
to
c4f33f5
Compare
`-Cdebuginfo=1` was never line tables only and can't be due to backwards compatibility issues. This was clarified and an option for line tables only was added. Additionally an option for line info directives only was added, which is well needed for some targets. The debug info options should now behave the same as clang's debug info options.
c4f33f5
to
8bfc641
Compare
* `1`: line tables only. | ||
* `2`: full debug info. | ||
* `0` or `none`: no debug info at all (the default). | ||
* `line-directives-only`: line info directives only, (For the nvptx* targets this enables [profiling](https://reviews.llvm.org/D46061), but on other targets the behavior is unspecified). |
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.
Hm, claiming unspecified behaviour in our flags unnecessarily feels… bad? Could we just say "enables profiling for some targets" (also what kind of profiling? sampling? instrumented?) for now?
ping from triage: |
☔ The latest upstream changes (presumably #88354) made this pull request unmergeable. Please resolve the merge conflicts. |
…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
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 #60020
Fix #64405