-
Notifications
You must be signed in to change notification settings - Fork 12.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Driver] Make /Zi and /Z7 aliases of -g rather than handling them spe…
…cially The -g flag has been selecting whether to emit dwarf or codeview based on the target ABI since 2018, so simply aliasing these flags does the right thing for clang-cl. This moves some code from Clang::ConstructJob to renderDebugOptions to make things a little clearer now that we don't need to keep track of whether we're doing codeview or not in multiple places, and also combines the duplicate handling of the cl vs clang handling of jmc flags as a result. This is mostly NFC, but some -cc1 flags may be rendered in a slightly different order because of the code that was moved around. Differential Revision: https://reviews.llvm.org/D157794
- Loading branch information
Showing
5 changed files
with
45 additions
and
78 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
f58330c
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.
CC @MaskRay and @bogner
This change had a surprising, and seemingly unintended effect: If compiling an assembly (
.s
) file withclang-cl /Z7
, the output object file now contains DWARF debug info, even if/Z7
is supposed to map to codeview. See #101710 (comment) for reference for a full case where this breaks a LLDB test.Does anyone know right off the bat where to start looking into that, or should I open a specific directed issue about it?
f58330c
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.
I'm starting a 3-week vacation today and will have limited availability. I don't know where to look at it off my head :)