From 2ca04c67cb55cd3dfb3d5a238e5f353e2cfbc3a6 Mon Sep 17 00:00:00 2001 From: Marcin Kolny Date: Tue, 21 Mar 2023 11:23:10 +0000 Subject: [PATCH] Upgrade wasi sdk to v20 with threads --- scripts/update-proposal-tests.sh | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/scripts/update-proposal-tests.sh b/scripts/update-proposal-tests.sh index ed16a22c..086a6706 100755 --- a/scripts/update-proposal-tests.sh +++ b/scripts/update-proposal-tests.sh @@ -5,7 +5,7 @@ REPOS=( "wasi-threads" ) -WASI_VERSION=16 +WASI_VERSION=20 WASI_SDK_DIR=$(pwd)/wasi-sdk BASE_BRANCH="prod/testsuite-base" PROPOSALS_DIR="tests/proposals" @@ -18,20 +18,14 @@ fi function install_wasi_sdk() { - curl -L -f https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_VERSION}/wasi-sdk-${WASI_VERSION}.0-linux.tar.gz --output wasi-sdk.tar.gz + curl -L -f https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_VERSION}%2Bthreads/wasi-sdk-${WASI_VERSION}.0.threads-linux.tar.gz --output wasi-sdk.tar.gz tar xvf wasi-sdk.tar.gz - mv wasi-sdk-${WASI_VERSION}.0 $WASI_SDK_DIR + mv wasi-sdk-${WASI_VERSION}.0+threads $WASI_SDK_DIR } function build_wasi-threads() { - # Compile wasi-libc with thread support as it's not available yet in wasi-sdk - git clone https://github.com/WebAssembly/wasi-libc.git - pushd wasi-libc - CC=$WASI_SDK_DIR/bin/clang make -j 15 THREAD_MODEL=posix - SYSROOT=$(pwd)/sysroot - popd - CC="$WASI_SDK_DIR/bin/clang -D_REENTRANT -matomics -Wl,--import-memory -Wl,--shared-memory --sysroot=$SYSROOT --target=wasm32-wasi-threads -Wno-error=implicit-function-declaration" ./build.sh + CC="$WASI_SDK_DIR/bin/clang -pthread -Wl,--import-memory --target=wasm32-wasi-threads" ./build.sh } function update_repo()