Skip to content

Commit

Permalink
chore: Detect if there's already a rustc installed that can target wa…
Browse files Browse the repository at this point in the history
…sm32-wasi (#647)
  • Loading branch information
elliottt authored Sep 5, 2023
1 parent 6a7fc8c commit 8328add
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion runtime/spidermonkey/build-engine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,16 @@ esac


# Ensure the Rust version matches that used by Gecko, and can compile to WASI
rustup target add wasm32-wasi
rustc_valid=
if command -v rustc > /dev/null && command -v cargo > /dev/null; then
if rustc --print target-list | grep -q '^wasm32-wasi$'; then
rustc_valid=1
fi
fi

if [ -z "$rustc_valid" ]; then
rustup target add wasm32-wasi
fi

# Use Gecko's build system bootstrapping to ensure all dependencies are
# installed
Expand Down

0 comments on commit 8328add

Please sign in to comment.