Skip to content

Commit

Permalink
cmake: Enforce Linux platform in wasm32-wasi
Browse files Browse the repository at this point in the history
  • Loading branch information
axic authored and chfast committed May 25, 2021
1 parent 6b25a1f commit 2b4d601
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmake/toolchains/wasm32-wasi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ if(NOT WASI_SDK_PREFIX STREQUAL /opt/wasi-sdk)
endif()

include(${WASI_SDK_PREFIX}/share/cmake/wasi-sdk.cmake)

# Override the default in wasi-sdk.cmake which sets it at "WASI"
# That does not exists in CMake Platforms, and as a result falls back to the host
# toolchain, which on macOS includes extra linker flags.
set(CMAKE_SYSTEM_NAME Linux)

0 comments on commit 2b4d601

Please sign in to comment.