Skip to content

Commit

Permalink
Add support for wasm32 architecture in SwiftSupport.cmake
Browse files Browse the repository at this point in the history
`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.
  • Loading branch information
MaxDesiatov authored Aug 8, 2021
1 parent 3a3241b commit 6806456
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmake/modules/SwiftSupport.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 6806456

Please sign in to comment.