Skip to content

Commit c88d841

Browse files
committed
Fix py3 for Emscripten 1.39.18
Notably fix build dependencies by regenerating Makefile after modifying Setup.local
1 parent 34aa83e commit c88d841

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

2.7.10/python.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ emscripten () {
9696
# Modules/Setup.local
9797
echo '*static*' > Modules/Setup.local
9898
cat $SETUPLOCAL >> Modules/Setup.local
99+
emmake make Makefile
99100
# drop -I/-L/-lz, we USE_ZLIB=1 (keep it in SETUPLOCAL for mock)
100101
sed -i -e 's/^\(zlib zlibmodule.c\).*/\1/' Modules/Setup.local
101102

3.8/python.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ emscripten () {
6262
# --disable-ipv6: ?
6363
# --disable-shared: compile statically for Emscripten perfs + incomplete PIC support
6464
if [ ! -e config.status ]; then
65-
CONFIG_SITE=../config-emscripten.site BASECFLAGS='-s USE_ZLIB=1' READELF=true \
65+
CONFIG_SITE=../config-emscripten.site READELF=true \
66+
BASECFLAGS='-s USE_ZLIB=1' LDFLAGS='-s USE_ZLIB=1' \
6667
PATH=$BUILD/Python-$VERSION/native:$PATH \
6768
emconfigure ../configure \
6869
--host=asmjs-unknown-emscripten --build=$(../config.guess) \
@@ -83,6 +84,7 @@ EOF
8384
cat $SETUPLOCAL >> Modules/Setup.local
8485
# drop -I/-L/-lz, we USE_ZLIB=1 (keep it in SETUPLOCAL for mock)
8586
sed -i -e 's/^\(zlib zlibmodule.c\).*/\1/' Modules/Setup.local
87+
emmake make Makefile
8688
# decrease .pyo size by dropping docstrings
8789
sed -i -e '/compileall.py/ s/ -O / -OO /' Makefile
8890

0 commit comments

Comments
 (0)