summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorShoaib Meenai <smeenai@fb.com>2017-12-13 21:12:37 +0000
committerShoaib Meenai <smeenai@fb.com>2017-12-13 21:12:37 +0000
commita85ea41fd18cb6521655e0fceb58b2b8ce23b563 (patch)
tree835b8f21ea32ea2c55fc89200eebe2b546f71b7d /cmake
parent80b1dd834f55e351e57e9c17fffc1a2d16c4c6ec (diff)
[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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320616 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r--cmake/platforms/WinMsvc.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmake/platforms/WinMsvc.cmake b/cmake/platforms/WinMsvc.cmake
index 9ea9ff78a25..34e6bbb9f9b 100644
--- a/cmake/platforms/WinMsvc.cmake
+++ b/cmake/platforms/WinMsvc.cmake
@@ -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"