Add comment about necessity of adding SDK paths to compiler flags

This commit is contained in:
Ivan Pozdeev 2023-10-15 16:36:28 +03:00
parent a0d35db6a0
commit 48766eb177

View File

@ -1629,6 +1629,9 @@ use_xcode_sdk_zlib() {
local xc_sdk_path="$(xcrun --show-sdk-path 2>/dev/null || true)"
if [ -d "$xc_sdk_path" ]; then
echo "python-build: use zlib from xcode sdk"
# Even though SDK's compiler uses the SDK dirs implicitly,
# CPython's setup.py has to have nonstandard paths specified explicitly
# to search for zlib.h in them
export CPPFLAGS="${CPPFLAGS:+$CPPFLAGS }-I${xc_sdk_path}/usr/include"
if is_mac -ge 1100; then
export LDFLAGS="${LDFLAGS:+$LDFLAGS }-L${xc_sdk_path}/usr/lib"