Skip to content

Commit a8346a8

Browse files
committed
Update compiler/STL version mismatch condition
MSVC 14.43 added a requirement for Clang 18, which is not currently supported by any Swift toolchain version. This updates the condition for setting the `_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH` compiler define for MSVC 14.43 and higher.
1 parent cc14548 commit a8346a8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

SwiftCompilerSources/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,8 @@ function(add_swift_compiler_modules_library name)
187187
# The STL in VS 17.10 requires Clang 17 or higher, but bootstrapping generally uses toolchains with older versions
188188
# versions of Clang. Swift 6 toolchains are the first to include Clang 17, so if we are on Windows and using an
189189
# earlier toolchain, we need to relax to relax this requirement with ALLOW_COMPILER_AND_STL_VERSION_MISMATCH.
190-
if (CMAKE_Swift_COMPILER_VERSION VERSION_LESS 6.0)
190+
# MSVC 14.43 requires Clang 18 or higher, which is currently not available in any Swift toolchain.
191+
if (CMAKE_Swift_COMPILER_VERSION VERSION_LESS 6.0 OR MSVC_VERSION VERSION_GREATER_EQUAL 1943)
191192
list(APPEND swift_compile_options "-Xcc" "-D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH")
192193
endif()
193194

0 commit comments

Comments
 (0)