llvm-project/clang/lib/Driver
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
..
Action.cpp [CUDA] Invoke ptxas and fatbinary during compilation. 2016-01-14 21:41:27 +00:00
CMakeLists.txt Support mingw-w64 and mingw.org toolchains at any install location. 2015-07-02 04:45:27 +00:00
Compilation.cpp Bail on compilation as soon as a job fails. 2016-02-24 21:49:28 +00:00
CrossWindowsToolChain.cpp Driver: tweak CrossWindows sanitizer support 2015-10-29 03:36:38 +00:00
Driver.cpp Embed bitcode in object file (clang cc1 part) 2016-05-11 16:26:03 +00:00
DriverOptions.cpp Update clang to match llvm r250901. OptTable constructor now takes an ArrayRef. NFC 2015-10-21 16:31:33 +00:00
InputInfo.h Add an Action* member to InputInfo. 2016-01-11 23:15:21 +00:00
Job.cpp [CrashReproducer] Pass -I, -F and -resource-dir to the reproducer script when using modules/vfs 2016-04-04 20:26:57 +00:00
MSVCToolChain.cpp Get default -fms-compatibility-version from cl.exe's version 2016-05-13 23:20:11 +00:00
MinGWToolChain.cpp Revert r253898 and r253899, this breaks mingw compilation on openSUSE. 2016-01-12 10:41:20 +00:00
Multilib.cpp [Driver] Remove `else` after `return` 2015-10-12 14:32:57 +00:00
Phases.cpp Reapply "Change -save-temps to emit unoptimized bitcode files." 2014-12-21 07:00:00 +00:00
SanitizerArgs.cpp document -f[no-]sanitize-recover=all and mention it in warning messages 2016-05-04 20:21:47 +00:00
Tool.cpp Roll-back r250822. 2015-10-20 13:23:58 +00:00
ToolChain.cpp Make FreeBSD and NetBSD use CLANG_DEFAULT_CXX_STDLIB 2016-03-14 14:34:04 +00:00
ToolChains.cpp Update clang support on recent Haiku 2016-05-11 16:19:05 +00:00
ToolChains.h Get default -fms-compatibility-version from cl.exe's version 2016-05-13 23:20:11 +00:00
Tools.cpp Get default -fms-compatibility-version from cl.exe's version 2016-05-13 23:20:11 +00:00
Tools.h Get default -fms-compatibility-version from cl.exe's version 2016-05-13 23:20:11 +00:00
Types.cpp Fix remaining Clang-tidy readability-redundant-control-flow warnings; other minor fixes. 2016-02-12 22:53:10 +00:00