dockcross/web-wasi/Toolchain.cmake
Matt McCormick e0dcb396b6 web-wasi: Bump to WASI-SDK 17
The binary linux SDK in version 17 requires a newer glibc than we have
available, so we have to use our own patched clang. This follows the
approach in:

  https://github.com/WebAssembly/wasi-sdk/pull/271
2022-12-28 11:02:13 -05:00

13 lines
472 B
CMake

set(WASI_SDK_PREFIX $ENV{WASI_SDK_PATH})
include($ENV{WASI_SDK_PATH}/share/cmake/wasi-sdk.cmake)
set(CMAKE_FIND_ROOT_PATH $ENV{CROSS_ROOT})
set(CMAKE_SYSROOT $ENV{WASI_SYSROOT})
set(CMAKE_C_COMPILER /usr/local/bin/clang-wasi-sysroot.sh)
set(CMAKE_CXX_COMPILER /usr/local/bin/clang++-wasi-sysroot.sh)
set(CMAKE_AR llvm-ar-$ENV{LLVM_VERSION})
set(CMAKE_RANLIB llvm-ranlib-$ENV{LLVM_VERSION})
set(CMAKE_CROSSCOMPILING_EMULATOR /wasi-runtimes/wasmtime/bin/wasmtime-pwd.sh)