Skip to content

Commit 66e6329

Browse files
committed
3.1.50pre
1 parent bf08385 commit 66e6329

File tree

2 files changed

+27
-5
lines changed

2 files changed

+27
-5
lines changed

config

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ export PYMINOR=$(echo -n $PYBUILD|cut -d. -f2)
1414
export HOST_PREFIX=${HOST_PREFIX:-${SDKROOT}/devices/$(arch)/usr}
1515
export PREFIX=${PREFIX:-${SDKROOT}/devices/emsdk/usr}
1616

17-
mkdir -p ${SDKROOT}/build/pycache
17+
mkdir -p ${SDKROOT}/build/pycache ${SDKROOT}/build/pip
18+
export XDG_CACHE_HOME=$(realpath ${SDKROOT}/build/pip)
1819
export PYTHONPYCACHEPREFIX=${PYTHONPYCACHEPREFIX:-$(realpath ${SDKROOT}/build/pycache)}
1920

21+
2022
export HOME=${SDKROOT}
2123

2224
export HPY=${HOST_PREFIX}/bin/python${PYBUILD}

scripts/emsdk-fetch.sh

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,19 +189,30 @@ PY_MODULE=false
189189
MVP=\${MVP:true}
190190
WASM_PURE=\${WASM_PURE:true}
191191
192+
193+
194+
192195
if \$MVP
193196
then
197+
198+
# turn of wasm ex (https://github.com/emscripten-core/emscripten/pull/20536)
199+
# -fno-wasm-exceptions -sEMSCRIPTEN_LONGJMP=0
200+
201+
WASMOPTS="-fno-wasm-exceptions -sSUPPORT_LONGJMP=emscripten"
202+
194203
# -mcpu=generic would activate those https://reviews.llvm.org/D125728
195204
# https://github.com/emscripten-core/emscripten/pull/17689
205+
196206
# -fPIC not allowed with -mno-mutable-globals
197207
# -mno-sign-ext not allowed with pthread
198-
CPU="-sSUPPORT_LONGJMP=emscripten -mnontrapping-fptoint -mno-reference-types -mno-sign-ext -m32"
208+
209+
CPU="-mnontrapping-fptoint -mno-reference-types -mno-sign-ext -m32"
199210
else
200211
CPU="-mcpu=bleeding-edge -m32"
201212
fi
202213
203214
# quick hack until 3.1.47
204-
CPU="$WASM_EXTRA \$CPU"
215+
WASMOPTS="$WASM_EXTRA \$WASMOPTS"
205216
206217
207218
LINKING=\${LINKING:-false}
@@ -299,6 +310,15 @@ for arg do
299310
continue
300311
fi
301312
313+
if [ "\$arg" = "-pthread" ]
314+
then
315+
if echo \$CPU|grep -q mno-sign-ext
316+
then
317+
continue
318+
fi
319+
fi
320+
321+
302322
# that is for some very bad setup.py behaviour regarding cross compiling.
303323
# should not be needed ..
304324
[ "\$arg" = "-I/usr/include" ] && continue
@@ -365,8 +385,8 @@ then
365385
fi
366386
fi
367387
else
368-
# pass CPU opts only when -c/-o but always PIC
369-
$EMSDK_PYTHON -E \$0.py \$CPU_EXTRA -fpic \$COPTS \$CPPFLAGS -DBUILD_STATIC "\$@" \$COMMON
388+
# do not pass WASM opts when -c/-o but always PIC
389+
$EMSDK_PYTHON -E \$0.py $COPTS \$CPU \$CPPFLAGS -DBUILD_STATIC "\$@" \$COMMON
370390
fi
371391
#else
372392
# unset _EMCC_CCACHE

0 commit comments

Comments
 (0)