File tree 1 file changed +10
-4
lines changed
1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -184,10 +184,16 @@ function(add_swift_compiler_modules_library name)
184
184
# https://github.com/apple/swift/issues/73254
185
185
list (APPEND swift_compile_options "-Xllvm" "-sil-disable-pass=loadable-address" )
186
186
187
- # The STL in VS 17.10 requires Clang 17 or higher, but bootstrapping generally uses toolchains with older versions
188
- # versions of Clang. Swift 6 toolchains are the first to include Clang 17, so if we are on Windows and using an
189
- # 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)
187
+ # MSVC 14.40 (VS 17.10, MSVC_VERSION 1940) added a requirement for Clang 17 or higher.
188
+ # Swift 6.0 is the first version to include Clang 17.
189
+ # MSVC 14.43 (VS 17.13, MSVC_VERSION 1943) added a requirement for Clang 18 or higher.
190
+ # Swift 6.1 is the first version to include Clang 18.
191
+ # These requirements can be found in `include/yvals_core.h` in the MSVC headers.
192
+ # Bootstrapping generally uses toolchains with older versions of Clang, so if we are on Windows
193
+ # and using an earlier toolchain, we need to relax this requirement by setting
194
+ # `_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH`.
195
+ if ((CMAKE_Swift_COMPILER_VERSION VERSION_LESS 6.0 AND MSVC_VERSION VERSION_GREATER_EQUAL 1940) OR
196
+ (CMAKE_Swift_COMPILER_VERSION VERSION_LESS 6.1 AND MSVC_VERSION VERSION_GREATER_EQUAL 1943))
191
197
list (APPEND swift_compile_options "-Xcc" "-D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH" )
192
198
endif ()
193
199
You can’t perform that action at this time.
0 commit comments