[llvm-commits] [PATCH 1/4][llvm] Introduce Triple::MinGW.

Duncan Sands baldrick at free.fr
Tue Feb 15 02:35:16 PST 2011


Hi,

> On Tue, Feb 15, 2011 at 7:01 PM, Duncan Sands<baldrick at free.fr>  wrote:
>>> @@ -84,8 +84,10 @@ public:
>>>      FreeBSD,
>>>      Linux,
>>>      Lv2,        // PS3
>>> -    MinGW32,
>>> +    MinGW,      // i*86-pc-mingw32, *-w64-mingw32
>>> +#define MinGW32 MinGW
>>>      MinGW64,
>>> +    // FIXME: They will be removed soon.
>>
>> why not remove them at once?
>
> [3/4] removes them. I think MinGW32 and MinGW64 should be kept here for now.
> For consistency to clang. I cannot commit to llvm and clang at the
> same time atomically. :(
> Please be patient.

OK :)

>>> @@ -316,10 +316,8 @@ Triple::OSType Triple::ParseOS(StringRef OSName) {
>>>      return Linux;
>>>    else if (OSName.startswith("lv2"))
>>>      return Lv2;
>>> -  else if (OSName.startswith("mingw32"))
>>> -    return MinGW32;
>>> -  else if (OSName.startswith("mingw64"))
>>> -    return MinGW64;
>>> +  else if (OSName.startswith("mingw"))
>>> +    return MinGW;
>>
>> here you will accept mingw, ming32 and mingw64 while gcc only accepts
>> mingw32.  I'm not saying that this is wrong, but maybe it is unwise.
>
> I understand. In practice, llvm's config.sub recognizes "mingw32",
> neither "mingw" nor "mingw64".
>
>    $ ./config.sub mingw32 (mingw and mingw64 are not recognized)
>    i386-pc-mingw32
>
> I thought it would be better to relax recognizing triplet, though,
> that makes sense.

The danger that I see is that because it will accept mingw64, people will
think that by passing mingw64 they are telling LLVM something different to
mingw32, creating confusion.  That said, I think this patch is OK to apply.

Ciao, Duncan.



More information about the llvm-commits mailing list