Skip to content

Commit 7616370

Browse files
committed
unix: include object files from Parser/pegen
This directory was added in Python 3.9 and contains core symbols that are necessary to link a libpython.
1 parent db20466 commit 7616370

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

cpython-unix/build-cpython.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -511,9 +511,12 @@ fi
511511

512512
# Also copy object files so they can be linked in a custom manner by
513513
# downstream consumers.
514-
for d in Modules Objects Parser Programs Python; do
515-
mkdir -p ${ROOT}/out/python/build/$d
516-
cp -av $d/*.o ${ROOT}/out/python/build/$d/
514+
for d in Modules Objects Parser Parser/pegen Programs Python; do
515+
# Parser/pegen only exists in 3.9+
516+
if [ -d $d ]; then
517+
mkdir -p ${ROOT}/out/python/build/$d
518+
cp -av $d/*.o ${ROOT}/out/python/build/$d/
519+
fi
517520
done
518521

519522
# Also copy extension variant metadata files.

0 commit comments

Comments
 (0)