Add wasm32 toolchains

This commit is contained in:
Duncan Ogilvie
2025-01-12 14:41:31 +01:00
parent 0184e268d3
commit 53e90f1cbc
4 changed files with 7 additions and 0 deletions

View File

@@ -0,0 +1 @@
set(WASI 1)

View File

@@ -32,6 +32,10 @@ elseif(ZIG_OS STREQUAL "uefi")
set(CMAKE_SYSTEM_NAME "UEFI")
# Fix compiler detection (lld-link: error: <root>: undefined symbol: EfiMain)
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
elseif(ZIG_OS STREQUAL "wasi")
set(CMAKE_SYSTEM_NAME "WASI")
elseif(ZIG_OS STREQUAL "emscripten")
set(CMAKE_SYSTEM_NAME "Emscripten")
else()
# NOTE: If this happens, add a new case with one of the following system names:
# https://cmake.org/cmake/help/latest/variable/CMAKE_SYSTEM_NAME.html#system-names-known-to-cmake

View File

@@ -0,0 +1 @@
include(${CMAKE_CURRENT_LIST_DIR}/cmake/zig-toolchain.cmake)

1
wasm32-wasi-musl.cmake Normal file
View File

@@ -0,0 +1 @@
include(${CMAKE_CURRENT_LIST_DIR}/cmake/zig-toolchain.cmake)