File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 31
31
run : |
32
32
mkdir dist
33
33
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 -xf wasi-sdk-20.25g964191c91aac-linux.tar.gz
36
+ export WASI_SDK_PREFIX=$PWD/wasi-sdk-20.25g964191c91aac
34
37
bash ./build-engine.sh release
35
38
tar -a -cf dist/spidermonkey-wasm-static-lib_release.tar.gz release
36
39
rm -rf release obj-release
Original file line number Diff line number Diff line change @@ -29,6 +29,11 @@ ac_add_options --enable-portable-baseline-interp
29
29
ac_add_options --prefix=${working_dir} /${objdir} /dist
30
30
mk_add_options MOZ_OBJDIR=${working_dir} /${objdir}
31
31
mk_add_options AUTOCLOBBER=1
32
+ export RUSTFLAGS="-C relocation-model=pic"
33
+ export RUSTC_BOOTSTRAP=1
34
+ export CFLAGS="-fPIC"
35
+ export CXXFLAGS="-fPIC"
36
+
32
37
EOF
33
38
34
39
target=" $( uname) "
@@ -105,6 +110,15 @@ python3 \
105
110
106
111
cd " $working_dir "
107
112
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
+
108
122
# Build SpiderMonkey for WASI
109
123
MOZCONFIG=" ${mozconfig} " \
110
124
MOZ_FETCHES_DIR=~ /.mozbuild \
Original file line number Diff line number Diff line change 1
1
[toolchain ]
2
- channel = " 1.68.2 "
2
+ channel = " 1.75 "
3
3
targets = [ " wasm32-wasi" ]
4
4
profile = " minimal"
You can’t perform that action at this time.
0 commit comments