This is an archive of the discontinued LLVM Phabricator instance.

Add missing mingw-w64 case for Triple -> TargetInfo mapping
AbandonedPublic

Authored by loladiro on Aug 5 2014, 11:30 PM.

Details

Reviewers
None
Summary

mingw-w64 triples define os=MinGW32. This adds the missing mapping.

Diff Detail

Event Timeline

loladiro updated this revision to Diff 12221.Aug 5 2014, 11:30 PM
loladiro retitled this revision from to Add missing mingw-w64 case for Triple -> TargetInfo mapping.
loladiro updated this object.
loladiro edited the test plan for this revision. (Show Details)
loladiro set the repository for this revision to rL LLVM.
loladiro added a subscriber: Unknown Object (MLST).

can this be tested?

Hmm, I saw this through the C++ API, but I'm having trouble reproducing it through the command line driver. Does the command line driver rewrite the passed in triple?

Ah, I see, the driver calls llvm::Triple::normalize on the pass. Should I do that on the client side in C++ then or should we put that later in clang, so triple passed in through the C++ interface get normalized as well?

MinGW is no longer treated as an OS. During the 3.5 cycle, we normalized the Windows triples. MinGW is treated as an environment, the OS is Windows. The resultant triple would be i686-windows-gnu or x86_64-windows-gnu. Users are still able to pass the old triple, however, internally, we expect the normalized form now.

The cases you are adding here were intentionally removed during that change. Please do not add these back. In fact, we should remove MinGW from the OS enumeration.

What exactly are you trying to do that this is causing you an issue?

loladiro abandoned this revision.Aug 7 2014, 10:08 PM

I was setting the clang triple to the result of
llvm::sys::getProcessTriple(), without calling normalize on it. Until
the enumeration is removed I think it would be nice to have a better
error rather than just silently failing.