Add wasm32 toolchains
This commit is contained in:
1
cmake/Platform/WASI.cmake
Normal file
1
cmake/Platform/WASI.cmake
Normal file
@@ -0,0 +1 @@
|
|||||||
|
set(WASI 1)
|
||||||
@@ -32,6 +32,10 @@ elseif(ZIG_OS STREQUAL "uefi")
|
|||||||
set(CMAKE_SYSTEM_NAME "UEFI")
|
set(CMAKE_SYSTEM_NAME "UEFI")
|
||||||
# Fix compiler detection (lld-link: error: <root>: undefined symbol: EfiMain)
|
# Fix compiler detection (lld-link: error: <root>: undefined symbol: EfiMain)
|
||||||
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
|
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()
|
else()
|
||||||
# NOTE: If this happens, add a new case with one of the following system names:
|
# 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
|
# https://cmake.org/cmake/help/latest/variable/CMAKE_SYSTEM_NAME.html#system-names-known-to-cmake
|
||||||
|
|||||||
1
wasm32-emscripten-musl.cmake
Normal file
1
wasm32-emscripten-musl.cmake
Normal file
@@ -0,0 +1 @@
|
|||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/cmake/zig-toolchain.cmake)
|
||||||
1
wasm32-wasi-musl.cmake
Normal file
1
wasm32-wasi-musl.cmake
Normal file
@@ -0,0 +1 @@
|
|||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/cmake/zig-toolchain.cmake)
|
||||||
Reference in New Issue
Block a user