Skip to content

Commit 4c6e13f

Browse files
authored
[flang] Add cmake error if building with clang-cl and MSVC 17.12 (#120114)
1 parent 55e87a7 commit 4c6e13f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

flang/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,13 @@ if (MSVC AND CMAKE_CXX_COMPILER_ID MATCHES Clang)
6666
if (IS_DIRECTORY "${LIBDIR}")
6767
link_libraries(${CLANG_RT_BUILTINS_LIBRARY})
6868
endif()
69+
70+
if (MSVC_VERSION EQUAL 1942)
71+
message(FATAL_ERROR "Flang cannot be built with clang and the MSVC 17.12 "
72+
"toolchain version. Please upgrade to 17.13 or later, or switch "
73+
"to the 17.10 LTSC release. "
74+
"See https://github.com/microsoft/STL/issues/4959 for more details.")
75+
endif()
6976
endif()
7077

7178
if(CMAKE_SIZEOF_VOID_P EQUAL 4)

0 commit comments

Comments
 (0)