Skip to content

Commit a305289

Browse files
committed
Use Joel's test build of WASI-SDK with dylib support for building the engine
1 parent 6c6b39d commit a305289

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ jobs:
3131
run: |
3232
mkdir dist
3333
sudo apt-get update -y
34+
wget --no-verbose https://github.com/dicej/wasi-sdk/releases/download/filesystem-fix-v3/wasi-sdk-20.25g964191c91aac-linux.tar.gz
35+
tar -xvf wasi-sdk-20.25g964191c91aac-linux.tar.gz
36+
export WASI_SDK_PREFIX=$PWD/wasi-sdk-20.25g964191c91aac
3437
bash ./build-engine.sh release
3538
tar -a -cf dist/spidermonkey-wasm-static-lib_release.tar.gz release
3639
rm -rf release obj-release

build-engine.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,15 @@ python3 \
110110

111111
cd "$working_dir"
112112

113+
if [[ -z "${WASI_SDK_PREFIX}" ]]; then
114+
echo "WASI_SDK_PREFIX not set, using default compiler and sysroot"
115+
else
116+
mv ~/.mozbuild/clang ~/.mozbuild/clang.orig
117+
mv ~/.mozbuild/sysroot-wasm32-wasi ~/.mozbuild/sysroot-wasm32-wasi.orig
118+
ln -s "${WASI_SDK_PREFIX}" ~/.mozbuild/clang
119+
ln -s "${WASI_SDK_PREFIX}/share/wasi-sysroot" ~/.mozbuild/sysroot-wasm32-wasi
120+
fi
121+
113122
# Build SpiderMonkey for WASI
114123
MOZCONFIG="${mozconfig}" \
115124
MOZ_FETCHES_DIR=~/.mozbuild \

0 commit comments

Comments
 (0)