Skip to content

Commit 52f98f6

Browse files
committed
fix _ctypes obj dir for static linking
1 parent f3c1244 commit 52f98f6

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

scripts/cpython-build-emsdk.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -241,11 +241,12 @@ END
241241
if pushd ${SDKROOT}/build/cpython-wasm
242242
then
243243
mkdir -p ${SDKROOT}/prebuilt/emsdk
244-
OBJS="build/temp.emscripten-wasm32-${PYBUILD}/opt/python-wasm-sdk/src/Python-3.11.5/Modules/_ctypes/_ctypes.o \
245-
build/temp.emscripten-wasm32-${PYBUILD}/opt/python-wasm-sdk/src/Python-3.11.5/Modules/_ctypes/callbacks.o \
246-
build/temp.emscripten-wasm32-${PYBUILD}/opt/python-wasm-sdk/src/Python-3.11.5/Modules/_ctypes/callproc.o \
247-
build/temp.emscripten-wasm32-${PYBUILD}/opt/python-wasm-sdk/src/Python-3.11.5/Modules/_ctypes/cfield.o \
248-
build/temp.emscripten-wasm32-${PYBUILD}/opt/python-wasm-sdk/src/Python-3.11.5/Modules/_ctypes/stgdict.o"
244+
OBJDIR=$(echo -n build/temp.emscripten-wasm32-${PYBUILD}/opt/python-wasm-sdk/src/Python-3.*)
245+
OBJS="${OBJDIR}/Modules/_ctypes/_ctypes.o \
246+
${OBJDIR}/Modules/_ctypes/callbacks.o \
247+
${OBJDIR}/Modules/_ctypes/callproc.o \
248+
${OBJDIR}/Modules/_ctypes/cfield.o \
249+
${OBJDIR}/Modules/_ctypes/stgdict.o"
249250

250251
$SDKROOT/emsdk/upstream/emscripten/emar rcs ${SDKROOT}/prebuilt/emsdk/lib_ctypes${PYBUILD}.a $OBJS
251252
popd

0 commit comments

Comments
 (0)