Skip to content

Commit a723e6d

Browse files
authored
CMake: disable libdispatch when targeting Wasm/WASI (swiftlang#39274)
Wasm/WASI doesn't currently support multi-threading, and libdispatch should be disabled when building for this target. Related to SR-12097.
1 parent 8256846 commit a723e6d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmake/modules/Libdispatch.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ endif()
4747
# Build any target libdispatch if needed.
4848
foreach(sdk ${SWIFT_SDKS})
4949
# Darwin targets have libdispatch available, do not build it.
50-
if(NOT "${sdk}" IN_LIST SWIFT_DARWIN_PLATFORMS)
50+
# Wasm/WASI doesn't support libdispatch yet. See https://bugs.swift.org/browse/SR-12097 for more details.
51+
if(NOT "${sdk}" IN_LIST SWIFT_DARWIN_PLATFORMS AND NOT "${sdk}" STREQUAL WASI)
5152
list(APPEND DISPATCH_SDKS "${sdk}")
5253
endif()
5354
endforeach()

0 commit comments

Comments
 (0)