mirror of
https://github.com/bensuperpc/dockcross.git
synced 2025-07-29 05:02:23 +02:00
web-wasi-threads: initial addition
This is a different toolchain following how wasi-sdk defines the platform triple and how builds are configured -- everything should be built with the flags defined in the toolchain file. We build from web-wasi:latest, and that is built first.
This commit is contained in:
11
web-wasi-threads/Dockerfile.in
Normal file
11
web-wasi-threads/Dockerfile.in
Normal file
@@ -0,0 +1,11 @@
|
||||
ARG ORG=dockcross
|
||||
FROM ${ORG}/web-wasi:latest
|
||||
|
||||
LABEL maintainer="Matt McCormick matt.mccormick@kitware.com"
|
||||
|
||||
ENV CROSS_TRIPLE=wasm32-wasi-threads
|
||||
|
||||
COPY Toolchain.cmake ${CROSS_ROOT}/
|
||||
ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/Toolchain.cmake
|
||||
|
||||
#include "common.label-and-env"
|
17
web-wasi-threads/Toolchain.cmake
Normal file
17
web-wasi-threads/Toolchain.cmake
Normal file
@@ -0,0 +1,17 @@
|
||||
set(WASI_SDK_PREFIX $ENV{WASI_SDK_PATH})
|
||||
include($ENV{WASI_SDK_PATH}/share/cmake/wasi-sdk-pthread.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_ASM_COMPILER clang-$ENV{LLVM_VERSION})
|
||||
|
||||
set(CMAKE_C_COMPILER_TARGET $ENV{CROSS_TRIPLE})
|
||||
set(CMAKE_CXX_COMPILER_TARGET $ENV{CROSS_TRIPLE})
|
||||
set(CMAKE_ASM_COMPILER_TARGET $ENV{CROSS_TRIPLE})
|
||||
|
||||
set(CMAKE_CROSSCOMPILING_EMULATOR /wasi-runtimes/wasmtime/bin/wasmtime-pwd-threads.sh)
|
Reference in New Issue
Block a user