Skip to content

Commit f9d4382

Browse files
committed
3.1.74.4pre
1 parent 030b87a commit f9d4382

File tree

3 files changed

+36
-17
lines changed

3 files changed

+36
-17
lines changed

python-wasi-sdk.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,13 @@ END
174174
then
175175
echo "keeping installed wasmtime and wasi binaries"
176176
else
177-
#wget https://github.com/bytecodealliance/wasmtime/releases/download/v22.0.0/wasmtime-v22.0.0-x86_64-linux.tar.xz
178-
# wget https://github.com/bytecodealliance/wasmtime/releases/download/v26.0.1/wasmtime-v26.0.1-$(arch)-$(PLATFORM).tar.xz \
177+
# wget https://github.com/bytecodealliance/wasmtime/releases/download/v22.0.0/wasmtime-v22.0.0-x86_64-linux.tar.xz
178+
# wget https://github.com/bytecodealliance/wasmtime/releases/download/v26.0.1/wasmtime-v26.0.1-$(arch)-$(PLATFORM).tar.xz
179+
# wget https://github.com/bytecodealliance/wasmtime/releases/download/v27.0.0/wasmtime-v27.0.0-$(arch)-${PLATFORM}.tar.xz
180+
#
179181
# TODO: window only has a zip archive, better use wasmtime-py instead.
180182

181-
wget https://github.com/bytecodealliance/wasmtime/releases/download/v27.0.0/wasmtime-v27.0.0-$(arch)-${PLATFORM}.tar.xz \
183+
wget https://github.com/bytecodealliance/wasmtime/releases/download/v29.0.1/wasmtime-v29.0.1-$(arch)-${PLATFORM}.tar.xz \
182184
-O-|xzcat|tar xfv -
183185
mv -vf $(find wasmtime*|grep /wasmtime$) ${SDKROOT}/devices/$(arch)/usr/bin
184186
fi

python-wasm-sdk.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,13 @@ END
174174
then
175175
echo "keeping installed wasmtime and wasi binaries"
176176
else
177-
#wget https://github.com/bytecodealliance/wasmtime/releases/download/v22.0.0/wasmtime-v22.0.0-x86_64-linux.tar.xz
178-
# wget https://github.com/bytecodealliance/wasmtime/releases/download/v26.0.1/wasmtime-v26.0.1-$(arch)-$(PLATFORM).tar.xz \
177+
# wget https://github.com/bytecodealliance/wasmtime/releases/download/v22.0.0/wasmtime-v22.0.0-x86_64-linux.tar.xz
178+
# wget https://github.com/bytecodealliance/wasmtime/releases/download/v26.0.1/wasmtime-v26.0.1-$(arch)-$(PLATFORM).tar.xz
179+
# wget https://github.com/bytecodealliance/wasmtime/releases/download/v27.0.0/wasmtime-v27.0.0-$(arch)-${PLATFORM}.tar.xz
180+
#
179181
# TODO: window only has a zip archive, better use wasmtime-py instead.
180182

181-
wget https://github.com/bytecodealliance/wasmtime/releases/download/v27.0.0/wasmtime-v27.0.0-$(arch)-${PLATFORM}.tar.xz \
183+
wget https://github.com/bytecodealliance/wasmtime/releases/download/v29.0.1/wasmtime-v29.0.1-$(arch)-${PLATFORM}.tar.xz \
182184
-O-|xzcat|tar xfv -
183185
mv -vf $(find wasmtime*|grep /wasmtime$) ${SDKROOT}/devices/$(arch)/usr/bin
184186
fi

scripts/emsdk-fetch.sh

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ then
2020
else
2121
git clone --no-tags --depth 1 --single-branch --branch main https://github.com/emscripten-core/emsdk.git
2222
pushd emsdk
23-
#git checkout 91f8563a9d1a4a0ec03bbb2be23485367d85a091
2423
./emsdk install ${EMFLAVOUR:-latest}
2524
./emsdk activate ${EMFLAVOUR:-latest}
2625
popd
@@ -34,13 +33,13 @@ then
3433
then
3534
echo " * found emsdk/.complete : not patching/building emsdk"
3635
else
37-
pushd emsdk/upstream/emscripten
36+
pushd emsdk
3837

38+
pushd emsdk/upstream/emscripten
3939

4040
echo "FIXME: applying stdio* are not const"
4141
sed -i 's|extern FILE \*const|extern FILE \*|g' cache/sysroot/include/stdio.h
4242

43-
4443
echo "FIXME: Applying https://github.com/emscripten-core/emscripten/pull/20281 dylink.js : handle ** argument case"
4544
if [ -f test/other/test_em_js_side.c ]
4645
then
@@ -81,12 +80,7 @@ END
8180
#wget https://patch-diff.githubusercontent.com/raw/emscripten-core/emscripten/pull/18941.diff
8281
#patch -p1 < 18941.diff
8382
fi
84-
popd # emsdk/upstream/emscripten
85-
86-
# wget https://raw.githubusercontent.com/paradust7/minetest-wasm/main/emsdk_emcc.patch
87-
# patch -p1 < emsdk_emcc.patch
8883

89-
pushd emsdk/upstream/emscripten
9084
echo "FIXME: Applying https://github.com/emscripten-core/emscripten/pull/21472 glfw3: gl level version major/minor hints"
9185
wget https://patch-diff.githubusercontent.com/raw/emscripten-core/emscripten/pull/21472.diff
9286
patch -p1 < 21472.diff
@@ -109,8 +103,29 @@ END
109103
#echo "FIXME: scriptDirectory workaround" MERGER
110104
#wget https://patch-diff.githubusercontent.com/raw/emscripten-core/emscripten/pull/22605.diff
111105
#patch -p1 < 22605.diff
112-
popd # upstream/emscripten
113106

107+
popd # emsdk/upstream/emscripten
108+
109+
# wget https://raw.githubusercontent.com/paradust7/minetest-wasm/main/emsdk_emcc.patch
110+
# patch -p1 < emsdk_emcc.patch
111+
112+
113+
# https://github.com/emscripten-forge/recipes/blob/main/recipes/recipes/emscripten_emscripten-wasm32/patches/0001-Add-useful-error-when-symbol-resolution-fails.patch
114+
patch -p1 <<END
115+
--- emsdk-orig/upstream/emscripten/src/library_dylink.js
116+
+++ emsdk/upstream/emscripten/src/library_dylink.js
117+
@@ -723,6 +723,9 @@
118+
var resolved;
119+
stubs[prop] = (...args) => {
120+
resolved ||= resolveSymbol(prop);
121+
+ if (!resolved) {
122+
+ throw new Error(`Dynamic linking error: cannot resolve symbol ${prop}`);
123+
+ }
124+
return resolved(...args);
125+
};
126+
}
127+
128+
END
114129

115130

116131
# https://github.com/paradust7/minetest-wasm/blob/main/emsdk_dirperms.patch
@@ -162,7 +177,7 @@ END
162177
case F_GETOWN_EX:
163178
case F_SETOWN:
164179
END
165-
180+
popd # emsdk
166181
fi # emsdk/.complete
167182

168183
export EMSDK_PYTHON=$SYS_PYTHON
@@ -349,7 +364,7 @@ END
349364
export EM_IGNORE_SANITY=1
350365

351366
export SYSROOT=$EMSDK/upstream/emscripten/cache/sysroot
352-
popd
367+
popd # ${SDKROOT:-/opt/python-wasm-sdk}
353368
else
354369
echo "emsdk: config already set !" 1>&2
355370
fi

0 commit comments

Comments
 (0)