web-wasi-threads: use target wasm32-wasi-threads in sysroot wrapper

And add -pthread flag.
This commit is contained in:
Matt McCormick
2025-01-07 10:59:10 -05:00
parent 96e8620255
commit aac97dfb18
4 changed files with 12 additions and 2 deletions

View File

@ -4,7 +4,11 @@ FROM ${ORG}/web-wasi:latest-${HOST_ARCH}
LABEL maintainer="Matt McCormick matt@mmmccormick.com"
COPY clang-wasi-threads-sysroot.sh clang++-wasi-threads-sysroot.sh /usr/local/bin/
ENV CROSS_TRIPLE=wasm32-wasi-threads
ENV CC=clang-wasi-threads-sysroot.sh \
CXX=clang++-wasi-threads-sysroot.sh
COPY Toolchain.cmake ${CROSS_ROOT}/
ENV CMAKE_TOOLCHAIN_FILE=${CROSS_ROOT}/Toolchain.cmake