Merge pull request #620 from thewtex/wasi-cmake-platform

web-wasi: Patch CMake with WASI platform
This commit is contained in:
Matt McCormick 2021-10-14 20:52:56 -04:00 committed by GitHub
commit 2b6cd4ae1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View File

@ -26,6 +26,8 @@ ENV AR=${CROSS_ROOT}/bin/llvm-ar \
CXX=clang++-wasi-sysroot.sh \ CXX=clang++-wasi-sysroot.sh \
LD=${CROSS_ROOT}/bin/wasm-ld LD=${CROSS_ROOT}/bin/wasm-ld
COPY WASI.cmake /usr/src/
RUN mv /usr/src/WASI.cmake /usr/share/cmake-*/Modules/Platform/
COPY Toolchain.cmake ${CROSS_ROOT}/ COPY Toolchain.cmake ${CROSS_ROOT}/
ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/Toolchain.cmake ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/Toolchain.cmake

View File

@ -1,5 +1,4 @@
set(WASI 1) set(WASI_SDK_PREFIX $ENV{WASI_SDK_PATH})
include($ENV{WASI_SDK_PATH}/share/cmake/wasi-sdk.cmake) include($ENV{WASI_SDK_PATH}/share/cmake/wasi-sdk.cmake)
set(CMAKE_FIND_ROOT_PATH $ENV{CROSS_ROOT}) set(CMAKE_FIND_ROOT_PATH $ENV{CROSS_ROOT})

2
web-wasi/WASI.cmake Normal file
View File

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