[patch][pr12684] Use the new mingw abi

Reid Kleckner rnk at google.com
Tue Nov 19 13:20:18 PST 2013


I guess this is http://llvm.org/bugs/show_bug.cgi?id=12684 .

Is this worth a flag, or should we just tell people to go use 3.3?  GCC
seems to have an -mabi=(sysv|ms) flag that looks like a much weaker form of
our -cxx-abi flag, in that it only tries to solve COM ABI compatibility.

gcc users appear to wish they had a flag (
http://gcc.gnu.org/ml/gcc/2012-05/msg00325.html), but the only reason that
particular user wanted a flag was due to our own mingw ABI incompatibility!
 Oops.

----

There's one other huge thing here: "- Windows mingw targets are using the
-mms-bitfields option by default."

Our -[fm]ms-bitfields support is not very good.  The logic is now
duplicated between MicrosoftRecordLayoutBuilder and the normal
RecordLayoutBuilder, and I've heard from Warren that the existing logic is
incorrect in some cases anyway.

IMO we should factor it so that have separate code doing the C++ object
record layout which then calls down into shared bitfield layout code when
it encounters a string of bitfields.


On Tue, Nov 19, 2013 at 1:03 PM, Rafael EspĂ­ndola <
rafael.espindola at gmail.com> wrote:

> Now that 3.4 branched and we will soon require gcc 4.7 to build, it
> probably makes more sense to use the new gcc 4.7 abi on mingw.
>
> The difference is documented is
> http://gcc.gnu.org/gcc-4.7/changes.html. GCC now uses thiscall by
> default for methods. This also has the benefit of helping shake down
> bugs since this is also true in the win32 abi.
>
> Cheers,
> Rafael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131119/6fe6d07d/attachment.html>


More information about the cfe-commits mailing list