[PATCH] D41157: [cmake] Explicitly set VS 2017 compatibility

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 13 00:42:40 PST 2017


smeenai created this revision.
smeenai added reviewers: compnerd, rnk, zturner.
Herald added a subscriber: mgorny.

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.


https://reviews.llvm.org/D41157

Files:
  cmake/platforms/WinMsvc.cmake


Index: cmake/platforms/WinMsvc.cmake
===================================================================
--- cmake/platforms/WinMsvc.cmake
+++ cmake/platforms/WinMsvc.cmake
@@ -211,6 +211,7 @@
 
 set(COMPILE_FLAGS
     -D_CRT_SECURE_NO_WARNINGS
+    -fms-compatibility-version=19.11
     -imsvc "${MSVC_INCLUDE}"
     -imsvc "${WINSDK_INCLUDE}/ucrt"
     -imsvc "${WINSDK_INCLUDE}/shared"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41157.126677.patch
Type: text/x-patch
Size: 389 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171213/4aca4660/attachment.bin>


More information about the llvm-commits mailing list