1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-19 10:05:05 -07:00

Check for iwasm existence before trying to use it

This commit is contained in:
Frank Denis 2023-02-07 18:28:10 +01:00
parent f71fed879c
commit d95e71db2e

View File

@ -76,6 +76,7 @@ if [ -z "$WASI_RUNTIME" ] || [ "$WASI_RUNTIME" = "wasm3" ]; then
fi
if [ -z "$WASI_RUNTIME" ] || [ "$WASI_RUNTIME" = "iwasm" ]; then
if command -v iwasm >/dev/null; then
if iwasm | grep -qi wasi >/dev/null 2>&1; then
if wamrc --version; then
wamrc -o "${1}.o" "$1" >/dev/null &&
@ -84,6 +85,7 @@ if [ -z "$WASI_RUNTIME" ] || [ "$WASI_RUNTIME" = "iwasm" ]; then
iwasm --dir=. "$1" && exit 0
fi
fi
fi
fi
if [ -z "$WASI_RUNTIME" ] || [ "$WASI_RUNTIME" = "wazero" ]; then