llvm.org GIT mirror llvm / 6803422
Since some time clang itself figures out the default for ms-compatibility-version and uses it. Trying to figure it out during build is redundant and also will not work when the environment variable VSINSTALLDIR is not defined (which is not defined if you don't install whole Visual Studio but use Visual C++ Build Tools package). Tested by bootstrapping clang with clang-cl. Differential Revision: http://reviews.llvm.org/D20672 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270860 91177308-0d34-0410-b5e6-96231b3b80d8 Ismail Donmez 4 years ago
1 changed file(s) with 0 addition(s) and 13 deletion(s). Raw diff Collapse all Expand all
352352 append("/Zc:rvalueCast" CMAKE_CXX_FLAGS)
353353
354354 if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
355 # Find and run MSVC (not clang-cl) and get its version. This will tell
356 # clang-cl what version of MSVC to pretend to be so that the STL works.
357 execute_process(COMMAND "$ENV{VSINSTALLDIR}/VC/bin/cl.exe"
358 OUTPUT_QUIET
359 ERROR_VARIABLE MSVC_COMPAT_VERSION
360 )
361 string(REGEX REPLACE "^.*Compiler Version ([0-9.]+) for .*$" "\\1"
362 MSVC_COMPAT_VERSION "${MSVC_COMPAT_VERSION}")
363 append("-fms-compatibility-version=${MSVC_COMPAT_VERSION}"
364 CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
365 endif()
366
367 if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
368355 # clang-cl and cl by default produce non-deterministic binaries because
369356 # link.exe /incremental requires a timestamp in the .obj file. clang-cl
370357 # has the flag /Brepro to force deterministic binaries. We want to pass that