[llvm] r320616 - [cmake] Explicitly set VS 2017 compatibility

Shoaib Meenai via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 13 13:12:37 PST 2017


Author: smeenai
Date: Wed Dec 13 13:12:37 2017
New Revision: 320616

URL: http://llvm.org/viewvc/llvm-project?rev=320616&view=rev
Log:
[cmake] Explicitly set VS 2017 compatibility

When cross-compiling using clang-cl 5.0 (which is currently the latest
stable release of the compiler), the default MS compatibility level is
set to VS 2013, which is too low to build LLVM. Explicitly set the
compatibility level to VS 2017 to support cross-compiling LLVM for
Windows using clang-cl 5.0. This will be a no-op when using clang-cl 6.0
and above, where the default MS compatibility level is already VS 2017.

Differential Revision: https://reviews.llvm.org/D41157

Modified:
    llvm/trunk/cmake/platforms/WinMsvc.cmake

Modified: llvm/trunk/cmake/platforms/WinMsvc.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/platforms/WinMsvc.cmake?rev=320616&r1=320615&r2=320616&view=diff
==============================================================================
--- llvm/trunk/cmake/platforms/WinMsvc.cmake (original)
+++ llvm/trunk/cmake/platforms/WinMsvc.cmake Wed Dec 13 13:12:37 2017
@@ -164,6 +164,7 @@ set(CROSS_TOOLCHAIN_FLAGS_NATIVE "${_CTF
 
 set(COMPILE_FLAGS
     -D_CRT_SECURE_NO_WARNINGS
+    -fms-compatibility-version=19.11
     -imsvc "${MSVC_INCLUDE}"
     -imsvc "${WINSDK_INCLUDE}/ucrt"
     -imsvc "${WINSDK_INCLUDE}/shared"




More information about the llvm-commits mailing list