Skip to content

Commit db20614

Browse files
DarumaDockertgross35
authored andcommitted
fix(wasi): build verify for wasm32-wasi
(backport <#4157>) (cherry picked from commit 5fc0321)
1 parent cbd4323 commit db20614

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

ci/verify-build.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ sparc64-unknown-linux-gnu \
9696
sparcv9-sun-solaris \
9797
wasm32-unknown-emscripten \
9898
wasm32-unknown-unknown \
99+
wasm32-wasip1 \
100+
wasm32-wasip2 \
99101
x86_64-linux-android \
100102
x86_64-unknown-freebsd \
101103
x86_64-unknown-linux-gnu \
@@ -231,12 +233,29 @@ else
231233
no_dist_targets=""
232234
fi
233235

236+
case "$rust" in
237+
"stable") supports_wasi_pn=1 ;;
238+
"beta") supports_wasi_pn=1 ;;
239+
"nightly") supports_wasi_pn=1 ;;
240+
*) supports_wasi_pn=0 ;;
241+
esac
242+
234243
for target in $targets; do
235244
if echo "$target" | grep -q "$filter"; then
236245
if [ "$os" = "windows" ]; then
237246
TARGET="$target" ./ci/install-rust.sh
238247
test_target "$target"
239248
else
249+
# `wasm32-wasip1` was renamed from `wasm32-wasi`
250+
if [ "$target" = "wasm32-wasip1" ] && [ "$supports_wasi_pn" = "0" ]; then
251+
target="wasm32-wasi"
252+
fi
253+
254+
# `wasm32-wasip2` only exists in recent versions of Rust
255+
if [ "$target" = "wasm32-wasip2" ] && [ "$supports_wasi_pn" = "0" ]; then
256+
continue
257+
fi
258+
240259
test_target "$target"
241260
fi
242261

0 commit comments

Comments
 (0)