Skip to content

Commit effb335

Browse files
[CMake] Add support for WebAssembly target architectures
To repair the swift-corelibs-foundation build on WebAssembly, we need to add support for Wasm targets to swift-collections' CMake build system.
1 parent 293314a commit effb335

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmake/modules/SwiftSupport.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ function(get_swift_host_arch result_var_name)
4545
set("${result_var_name}" "i686" PARENT_SCOPE)
4646
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i686")
4747
set("${result_var_name}" "i686" PARENT_SCOPE)
48+
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "wasm32")
49+
set("${result_var_name}" "wasm32" PARENT_SCOPE)
50+
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "wasm64")
51+
set("${result_var_name}" "wasm64" PARENT_SCOPE)
4852
else()
4953
message(FATAL_ERROR "Unrecognized architecture on host system: ${CMAKE_SYSTEM_PROCESSOR}")
5054
endif()

0 commit comments

Comments
 (0)