Skip to content

Commit

Permalink
fix(wasi): build verify for wasm32-wasi
Browse files Browse the repository at this point in the history
(backport <#4157>)
(cherry picked from commit 5fc0321)
  • Loading branch information
DarumaDocker authored and tgross35 committed Nov 27, 2024
1 parent cbd4323 commit db20614
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions ci/verify-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,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 \
Expand Down Expand Up @@ -231,12 +233,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

Expand Down

0 comments on commit db20614

Please sign in to comment.