From 5fc03210932398450773cfefdecd8687dd12d931 Mon Sep 17 00:00:00 2001 From: DarumaDocker Date: Wed, 27 Nov 2024 07:22:08 +0000 Subject: [PATCH] fix(wasi): build verify for wasm32-wasi --- ci/verify-build.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/ci/verify-build.sh b/ci/verify-build.sh index 7d3e556e0c55..29713615590d 100755 --- a/ci/verify-build.sh +++ b/ci/verify-build.sh @@ -95,6 +95,8 @@ sparc64-unknown-linux-gnu \ sparcv9-sun-solaris \ wasm32-unknown-emscripten \ wasm32-unknown-unknown \ +wasm32-wasip1 \ +wasm32-wasip2 \ x86_64-linux-android \ x86_64-unknown-freebsd \ x86_64-unknown-linux-gnu \ @@ -227,12 +229,29 @@ else no_dist_targets="" fi +case "$rust" in + "stable") supports_wasi_pn=1 ;; + "beta") supports_wasi_pn=1 ;; + "nightly") supports_wasi_pn=1 ;; + *) supports_wasi_pn=0 ;; +esac + for target in $targets; do if echo "$target" | grep -q "$filter"; then if [ "$os" = "windows" ]; then TARGET="$target" ./ci/install-rust.sh test_target "$target" else + # `wasm32-wasip1` was renamed from `wasm32-wasi` + if [ "$target" = "wasm32-wasip1" ] && [ "$supports_wasi_pn" = "0" ]; then + target="wasm32-wasi" + fi + + # `wasm32-wasip2` only exists in recent versions of Rust + if [ "$target" = "wasm32-wasip2" ] && [ "$supports_wasi_pn" = "0" ]; then + continue + fi + test_target "$target" fi