Skip to content

Commit

Permalink
[cmake] Explicitly set VS 2017 compatibility
Browse files Browse the repository at this point in the history
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320616 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
smeenai committed Dec 13, 2017
1 parent 80b1dd8 commit a85ea41
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmake/platforms/WinMsvc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ set(CROSS_TOOLCHAIN_FLAGS_NATIVE "${_CTF_NATIVE_DEFAULT}" CACHE STRING "")

set(COMPILE_FLAGS
-D_CRT_SECURE_NO_WARNINGS
-fms-compatibility-version=19.11
-imsvc "${MSVC_INCLUDE}"
-imsvc "${WINSDK_INCLUDE}/ucrt"
-imsvc "${WINSDK_INCLUDE}/shared"
Expand Down

0 comments on commit a85ea41

Please sign in to comment.