Update prebuilt Clang to r416183b from Android.
https://android.googlesource.com/platform/prebuilts/clang/host/
linux-x86/+/06a71ddac05c22edb2d10b590e1769b3f8619bef
clang 12.0.5 (based on r416183b) from build 7284624.
Change-Id: I277a316abcf47307562d8b748b84870f31a72866
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
diff --git a/linux-x64/clang/lib64/cmake/llvm/CheckCompilerVersion.cmake b/linux-x64/clang/lib64/cmake/llvm/CheckCompilerVersion.cmake
index 2f4d75f..375a526 100644
--- a/linux-x64/clang/lib64/cmake/llvm/CheckCompilerVersion.cmake
+++ b/linux-x64/clang/lib64/cmake/llvm/CheckCompilerVersion.cmake
@@ -4,20 +4,20 @@
include(CheckCXXSourceCompiles)
-set(GCC_MIN 4.8)
+set(GCC_MIN 5.1)
set(GCC_SOFT_ERROR 5.1)
-set(CLANG_MIN 3.1)
+set(CLANG_MIN 3.5)
set(CLANG_SOFT_ERROR 3.5)
-set(APPLECLANG_MIN 3.1)
+set(APPLECLANG_MIN 6.0)
set(APPLECLANG_SOFT_ERROR 6.0)
# https://en.wikipedia.org/wiki/Microsoft_Visual_C#Internal_version_numbering
-# _MSC_VER == 1910 MSVC++ 14.1 (Visual Studio 2017 version 15.0)
-set(MSVC_MIN 19.1)
-set(MSVC_SOFT_ERROR 19.1)
+# _MSC_VER == 1914 MSVC++ 14.14 (Visual Studio 2017 version 15.4)
+set(MSVC_MIN 19.14)
+set(MSVC_SOFT_ERROR 19.14)
# Map the above GCC versions to dates: https://gcc.gnu.org/develop.html#timeline
-set(GCC_MIN_DATE 20130322)
+set(GCC_MIN_DATE 20150422)
set(GCC_SOFT_ERROR_DATE 20150422)
@@ -50,6 +50,20 @@
check_compiler_version("AppleClang" "Apple Clang" ${APPLECLANG_MIN} ${APPLECLANG_SOFT_ERROR})
check_compiler_version("MSVC" "Visual Studio" ${MSVC_MIN} ${MSVC_SOFT_ERROR})
+# See https://developercommunity.visualstudio.com/content/problem/845933/miscompile-boolean-condition-deduced-to-be-always.html
+# and thread "[llvm-dev] Longstanding failing tests - clang-tidy, MachO, Polly"
+# on llvm-dev Jan 21-23 2020.
+if ((${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC) AND
+ (19.24 VERSION_LESS_EQUAL ${CMAKE_CXX_COMPILER_VERSION}) AND
+ (${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 19.25))
+ if(LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN)
+ message(WARNING "Host Visual Studio version 16.4 is known to miscompile part of LLVM")
+ else()
+ message(FATAL_ERROR "Host Visual Studio version 16.4 is known to miscompile part of LLVM, please use clang-cl or upgrade to 16.5 or above (use -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON to ignore)")
+ endif()
+endif()
+
+
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
if (CMAKE_CXX_SIMULATE_ID MATCHES "MSVC")
if (CMAKE_CXX_SIMULATE_VERSION VERSION_LESS MSVC_MIN)