1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-09 20:13:47 -05:00

Allow to build CPython with --with-dsymutil

Since 3.12, CPython can provide debug symbols in
Apple's nonstandard way, "dSYM bundles"
This commit is contained in:
Ivan Pozdeev
2022-09-23 12:16:39 +03:00
parent 5b08a6492b
commit f3521e88be
2 changed files with 75 additions and 5 deletions

View File

@@ -779,6 +779,7 @@ build_package_standard_build() {
else
use_homebrew_zlib || true
fi
use_dsymutil || true
fi
( if [ "${CFLAGS+defined}" ] || [ "${!PACKAGE_CFLAGS+defined}" ]; then
@@ -1626,6 +1627,16 @@ use_tcltk() {
fi
}
# Since 3.12, CPython can add DWARF debug information in MacOS
# using Apple's nonstandard way, `dsymutil', that creates a "dSYM bundle"
# that's supposed to be installed alongside executables
# (https://github.com/python/cpython/issues/95973).
use_dsymutil() {
if [[ -n "$PYTHON_BUILD_CONFIGURE_WITH_DSYMUTIL" ]] && is_mac; then
package_option python configure --with-dsymutil
fi
}
build_package_enable_shared() {
package_option python configure --enable-shared
}