From 4fc9fb8245abe24680192535870c4522644a4212 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 1 Mar 2019 11:24:15 -0800 Subject: [PATCH] Revert "Delete version check for clang-cl" This reverts commit f6605a6dcc678e8742e280c92a40a000202fd4d7. --- llvm/cmake/modules/CheckCompilerVersion.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llvm/cmake/modules/CheckCompilerVersion.cmake b/llvm/cmake/modules/CheckCompilerVersion.cmake index 4dce4514a6280b..47576a2b5e84c3 100644 --- a/llvm/cmake/modules/CheckCompilerVersion.cmake +++ b/llvm/cmake/modules/CheckCompilerVersion.cmake @@ -49,6 +49,9 @@ check_compiler_version("MSVC" "Visual Studio" ${MSVC_MIN} ${MSVC_SOFT_ERROR}) if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") if (CMAKE_CXX_SIMULATE_ID MATCHES "MSVC") + if (CMAKE_CXX_SIMULATE_VERSION VERSION_LESS MSVC_MIN) + message(FATAL_ERROR "Host Clang must have at least -fms-compatibility-version=${MSVC_MIN}, your version is ${CMAKE_CXX_SIMULATE_VERSION}.") + endif() set(CLANG_CL 1) elseif(NOT LLVM_ENABLE_LIBCXX) # Test that we aren't using too old of a version of libstdc++.