This is an archive of the discontinued LLVM Phabricator instance.

[clang] Enable -mms-bitfields by default for mingw targets
ClosedPublic

Authored by mstorsjo on Jun 13 2020, 1:25 PM.

Details

Summary

This matches GCC, which enabled -mms-bitfields by default for mingw targets in 4.7 [1].

[1] https://www.gnu.org/software/gcc/gcc-4.7/changes.html

Diff Detail

Event Timeline

mstorsjo created this revision.Jun 13 2020, 1:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 13 2020, 1:25 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript

Seems reasonable; GCC is the "system compiler" for this platform. Does isWindowsGNUEnvironment exactly track the condition that GCC uses? It's just MinGW, not Cygwin?

Seems reasonable; GCC is the "system compiler" for this platform. Does isWindowsGNUEnvironment exactly track the condition that GCC uses? It's just MinGW, not Cygwin?

Yes: https://github.com/llvm/llvm-project/blob/d700237f1aa1bc05d584a0f50fdad89370e17987/llvm/include/llvm/ADT/Triple.h#L563-L574

And the corresponding change in GCC, https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=99e7ad2ec6a78a6a55cefaa952b57870594c08ae, only changed it for MinGW, not Cygwin (and the corresponding files for cygwin don't have that bit set).

rjmccall accepted this revision.Jun 16 2020, 10:32 AM

Okay, thanks. LGTM, then.

This revision is now accepted and ready to land.Jun 16 2020, 10:32 AM
This revision was automatically updated to reflect the committed changes.