Targets.cpp enhancement for x86, Triple enhancement

I submitted something like this to cfe-commits a few weeks ago, but I guess in the release crunch it got lost. Here’s another crack at it here, as I stopped watching the commits traffic, as it got too heavy.

It’s another pass at refining Targets.cpp for Windows targets, revised for the current repository. From my original email:

clang_targets_enhancement.patch (6.86 KB)

llvm_triple_enhancement.patch (4.85 KB)

You may have mentioned this before, but why do we need a "visual studio" enhancement type?

-eric

Hi. This is my third time posting this. Could someone spare some time to check it out before it gets stale again.

One concern, however. Because a recent change elsewhere made access to the original triple string unavailable, further information about the processor is lost. I.e. x86 covers i386, i486, etc. Is it important to preserve this? I.e. perhaps as separate CPU types or perhaps as a CPU subtype?

clang_targets_enhancement.patch (6.86 KB)

llvm_triple_enhancement.patch (4.85 KB)

Hi John,

I have a hot date planned this evening with MSVC to poke the test
runner a bit further along, I'll try and take a look then.

- Daniel

Hi John

I could have sworn I replied at some point with comments on the triple
part, but I cannot find them now.

I don't think the triple changes are correct. These are not valid
triples, and we shouldn't manufacture new triples. Why was this part
necessary?

I think the Win?? triples should just map to the
VisualStudioWindowsX86... targets, does this make sense? If so, can
you change this to not require the LLVM triple changes.

Otherwise, looks good to me.

- Daniel

Hi,

when I compiled a program on windows with mingw header (3.4), I needed to define

__declspec (see http://lists.cs.uiuc.edu/pipermail/cfe-dev/2009-September/006443.html). Do you have a better solution or should this be added to the mingw target?

regards,

Cédric

John Thompson a écrit :

I think this should be added to the mingw target until someone feels like investigating more, patch preapproved!

-Chris