Re: [PATCH] D20672: Don't pass -fms-compatibility-version flag during build
This revision was automatically updated to reflect the committed changes. Closed by commit rL270860: Since some time clang itself figures out the default for ms-compatibility… (authored by ismail). Changed prior to commit: http://reviews.llvm.org/D20672?vs=58586&id=58623#toc Repository: rL LLVM http://reviews.llvm.org/D20672 Files: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake Index: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake === --- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake +++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake @@ -353,19 +353,6 @@ append("/Zc:rvalueCast" CMAKE_CXX_FLAGS) if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") -# Find and run MSVC (not clang-cl) and get its version. This will tell -# clang-cl what version of MSVC to pretend to be so that the STL works. -execute_process(COMMAND "$ENV{VSINSTALLDIR}/VC/bin/cl.exe" - OUTPUT_QUIET - ERROR_VARIABLE MSVC_COMPAT_VERSION - ) -string(REGEX REPLACE "^.*Compiler Version ([0-9.]+) for .*$" "\\1" - MSVC_COMPAT_VERSION "${MSVC_COMPAT_VERSION}") -append("-fms-compatibility-version=${MSVC_COMPAT_VERSION}" - CMAKE_C_FLAGS CMAKE_CXX_FLAGS) - endif() - - if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") # clang-cl and cl by default produce non-deterministic binaries because # link.exe /incremental requires a timestamp in the .obj file. clang-cl # has the flag /Brepro to force deterministic binaries. We want to pass that Index: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake === --- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake +++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake @@ -353,19 +353,6 @@ append("/Zc:rvalueCast" CMAKE_CXX_FLAGS) if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") -# Find and run MSVC (not clang-cl) and get its version. This will tell -# clang-cl what version of MSVC to pretend to be so that the STL works. -execute_process(COMMAND "$ENV{VSINSTALLDIR}/VC/bin/cl.exe" - OUTPUT_QUIET - ERROR_VARIABLE MSVC_COMPAT_VERSION - ) -string(REGEX REPLACE "^.*Compiler Version ([0-9.]+) for .*$" "\\1" - MSVC_COMPAT_VERSION "${MSVC_COMPAT_VERSION}") -append("-fms-compatibility-version=${MSVC_COMPAT_VERSION}" - CMAKE_C_FLAGS CMAKE_CXX_FLAGS) - endif() - - if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") # clang-cl and cl by default produce non-deterministic binaries because # link.exe /incremental requires a timestamp in the .obj file. clang-cl # has the flag /Brepro to force deterministic binaries. We want to pass that ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D20672: Don't pass -fms-compatibility-version flag during build
hans accepted this revision. hans added a comment. This revision is now accepted and ready to land. lgtm if it works :-) Repository: rL LLVM http://reviews.llvm.org/D20672 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D20672: Don't pass -fms-compatibility-version flag during build
ismail created this revision. ismail added reviewers: hans, rnk. ismail added a subscriber: cfe-commits. ismail set the repository for this revision to rL LLVM. 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. Repository: rL LLVM http://reviews.llvm.org/D20672 Files: cmake/modules/HandleLLVMOptions.cmake Index: cmake/modules/HandleLLVMOptions.cmake === --- cmake/modules/HandleLLVMOptions.cmake +++ cmake/modules/HandleLLVMOptions.cmake @@ -353,19 +353,6 @@ append("/Zc:rvalueCast" CMAKE_CXX_FLAGS) if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") -# Find and run MSVC (not clang-cl) and get its version. This will tell -# clang-cl what version of MSVC to pretend to be so that the STL works. -execute_process(COMMAND "$ENV{VSINSTALLDIR}/VC/bin/cl.exe" - OUTPUT_QUIET - ERROR_VARIABLE MSVC_COMPAT_VERSION - ) -string(REGEX REPLACE "^.*Compiler Version ([0-9.]+) for .*$" "\\1" - MSVC_COMPAT_VERSION "${MSVC_COMPAT_VERSION}") -append("-fms-compatibility-version=${MSVC_COMPAT_VERSION}" - CMAKE_C_FLAGS CMAKE_CXX_FLAGS) - endif() - - if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") # clang-cl and cl by default produce non-deterministic binaries because # link.exe /incremental requires a timestamp in the .obj file. clang-cl # has the flag /Brepro to force deterministic binaries. We want to pass that Index: cmake/modules/HandleLLVMOptions.cmake === --- cmake/modules/HandleLLVMOptions.cmake +++ cmake/modules/HandleLLVMOptions.cmake @@ -353,19 +353,6 @@ append("/Zc:rvalueCast" CMAKE_CXX_FLAGS) if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") -# Find and run MSVC (not clang-cl) and get its version. This will tell -# clang-cl what version of MSVC to pretend to be so that the STL works. -execute_process(COMMAND "$ENV{VSINSTALLDIR}/VC/bin/cl.exe" - OUTPUT_QUIET - ERROR_VARIABLE MSVC_COMPAT_VERSION - ) -string(REGEX REPLACE "^.*Compiler Version ([0-9.]+) for .*$" "\\1" - MSVC_COMPAT_VERSION "${MSVC_COMPAT_VERSION}") -append("-fms-compatibility-version=${MSVC_COMPAT_VERSION}" - CMAKE_C_FLAGS CMAKE_CXX_FLAGS) - endif() - - if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") # clang-cl and cl by default produce non-deterministic binaries because # link.exe /incremental requires a timestamp in the .obj file. clang-cl # has the flag /Brepro to force deterministic binaries. We want to pass that ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits