From 6806456a050cc171f411b79408c7a73ea78dad7f Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Sun, 8 Aug 2021 18:43:33 +0100 Subject: [PATCH] Add support for wasm32 architecture in `SwiftSupport.cmake` `get_swift_host_arch` CMake function maps `CMAKE_SYSTEM_PROCESSOR` to a provided variable name. We need to support the `wasm32` case to be able to build Foundation for that architecture. --- cmake/modules/SwiftSupport.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/modules/SwiftSupport.cmake b/cmake/modules/SwiftSupport.cmake index a3c519c5dd..517df86e65 100644 --- a/cmake/modules/SwiftSupport.cmake +++ b/cmake/modules/SwiftSupport.cmake @@ -33,6 +33,8 @@ function(get_swift_host_arch result_var_name) set("${result_var_name}" "i686" PARENT_SCOPE) elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i686") set("${result_var_name}" "i686" PARENT_SCOPE) + elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "wasm32") + set("${result_var_name}" "wasm32" PARENT_SCOPE) else() message(FATAL_ERROR "Unrecognized architecture on host system: ${CMAKE_SYSTEM_PROCESSOR}") endif()