Skip to content

Commit b14ea19

Browse files
committed
[Windows] Switch to 'PURE' bridging mode for now
With newer llvm, importing 'llvm/include/llvm/ADT/DynamicAPInt.h' causes an error: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include\numeric:598:12: error: function '_Select_countr_zero_impl<unsigned long long, (lambda at C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include\numeric:598:55)>' with deduced return type cannot be used before it is defined
1 parent 0fa07ba commit b14ea19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows" AND BOOTSTRAPPING_MODE STREQUAL "HO
434434
endif()
435435

436436
if(BRIDGING_MODE STREQUAL "DEFAULT" OR NOT BRIDGING_MODE)
437-
if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR (CMAKE_Swift_COMPILER AND CMAKE_Swift_COMPILER_VERSION VERSION_LESS 5.8))
437+
if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR "${SWIFT_HOST_VARIANT_SDK}" STREQUAL "WINDOWS" OR (CMAKE_Swift_COMPILER AND CMAKE_Swift_COMPILER_VERSION VERSION_LESS 5.8))
438438
# In debug builds, to workaround a problem with LLDB's `po` command (rdar://115770255).
439439
# If the host Swift version is less than 5.8, use pure mode to workaround a C++ interop compiler crash.
440440
set(BRIDGING_MODE "PURE")

0 commit comments

Comments
 (0)