[PATCH] MINGW64 Driver, TLS and SEH exception

Martell Malone martellmalone at gmail.com
Tue Apr 15 11:59:53 PDT 2014


Hi Reid,

TLS works for me with clang and the mingw64 headers to I assume that it is
ready within LLVM.
I have just submitted a patch to llvm maillist from kai of redstar.de for
the seh that I updated to work on llvm-head.

With regard to the _WIN32 ifdefs a sysroot mingw32 compiler should never be
generated on windows because that is the native platform.
We have all switched from doing that over at the mingw64 camp.

In the patch I have removed the Generic_GCC toolchain and replaced it with
the MINGW Driver.

@@ -1967,10 +1970,7 @@
       case llvm::Triple::GNU:
         // FIXME: We need a MinGW toolchain.  Use the default Generic_GCC
         // toolchain for now as the default case would below otherwise.
-        if (Target.isOSBinFormatELF())
-          TC = new toolchains::Generic_ELF(*this, Target, Args);
-        else
-          TC = new toolchains::Generic_GCC(*this, Target, Args);
+        TC = new toolchains::MinGW(*this, Target, Args);

Many Thanks
Martell



On Tue, Apr 15, 2014 at 7:51 PM, Reid Kleckner <rnk at google.com> wrote:

> For TLS, that seems fine to commit after the LLVM TLS changes land.  Or is
> LLVM already ready?
>
> Ditto for SEH.  It should land when LLVM is ready.  Otherwise I don't
> think it's interesting.
>
> The toolchain one is interesting, and is closest to ready to land.  I
> don't think the _WIN32 ifdefs are correct.  On all platforms, we should use
> the sysroot if provided and search relative to the clang binary if not.
>
> I'm not sure if the Generic_GCC toolchain is helpful here, but there might
> be some gcc detection logic there that's worth reusing.
>
>
> On Tue, Apr 15, 2014 at 11:42 AM, Yaron Keren <yaron.keren at gmail.com>wrote:
>
>> Hi Martell,
>>
>> For SEH support, the patch by Kai Nacke (
>> http://wiki.dlang.org/Building_and_hacking_LDC_on_Windows_using_MSVC )
>> should also be required, not?
>>
>> Yaron
>>
>>
>>
>> 2014-04-15 21:32 GMT+03:00 Martell Malone <martellmalone at gmail.com>:
>>
>>> Hi
>>>
>>> This is my first time using a mailing list so bare with me please.
>>>
>>> Based on work done by ruben vb I have created a patch for clang that
>>> will find the include directories for the new windows-gnu triplet.
>>> I have also enabled TLS which mingw64 supports and the introduction of
>>> SEH exceptions on the front end.
>>>
>>> A patch will also be sent to the llvm mailing list for the backend.
>>>
>>> Many Thanks
>>> Martell
>>>
>>> _______________________________________________
>>> cfe-commits mailing list
>>> cfe-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>>
>>>
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140415/096fbc1b/attachment.html>


More information about the cfe-commits mailing list