Commit Graph

3 Commits

Author SHA1 Message Date
Adrian McCarthy e4b26fc7a7 Get default -fms-compatibility-version from cl.exe's version
-fms-compatibility-version was defaulting to 18 (VS 2013), which is a pain if your environment is pointing to version 19 (VS 2015) libraries.

If cl.exe can be found, this patch uses its version number as the default instead. It re-uses the existing code to find the Visual Studio binaries folder and WinAPI methods to check its version. You can still explicitly specify a compatibility version on the command line. If you don't have cl.exe, this should be a no-op and you'll get the old default of 18.

This affected the tests, which assumed that if you didn't specific a version, that it would default to 18, but this won't be true for all machines. So a couple test cases had to be eliminated and a couple others had to be tweaked to allow for various outputs.

Addresses: https://llvm.org/bugs/show_bug.cgi?id=27215

Differential Revision: http://reviews.llvm.org/D20136

llvm-svn: 269515
2016-05-13 23:20:11 +00:00
David Majnemer 75fdd6b888 [Driver] Preserve the object file format in ComputeEffectiveClangTriple
The object file format is sometimes overridden for MSVC targets to use
ELF instead of COFF.  Make sure we preserve this choice when setting the
msvc version number in the triple.

llvm-svn: 239388
2015-06-09 06:30:01 +00:00
David Majnemer e11d373512 [Driver] Inject the MSVC compatibility version into the triple
Encoding the version into the triple will allow us to communicate to
LLVM what functions it can expect to depend upon in the implementation.

llvm-svn: 239273
2015-06-08 00:22:46 +00:00