Don't use Zlib from XCode SDK if a custom compiler is used (#2516)

This commit is contained in:
native-api 2022-11-05 02:11:55 +03:00 committed by GitHub
parent ad6a950734
commit 1250d7dd30
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1564,6 +1564,8 @@ use_homebrew_zlib() {
} }
use_xcode_sdk_zlib() { use_xcode_sdk_zlib() {
# If a custom compiler is used, including XCode SDK will likely break it
[[ "${CC:-clang}" != "clang" || "$(command -v clang 2>/dev/null || true)" != "/usr/bin/clang" ]] && return 1
local xc_sdk_path="$(xcrun --show-sdk-path 2>/dev/null || true)" local xc_sdk_path="$(xcrun --show-sdk-path 2>/dev/null || true)"
if [ -d "$xc_sdk_path" ]; then if [ -d "$xc_sdk_path" ]; then
echo "python-build: use zlib from xcode sdk" echo "python-build: use zlib from xcode sdk"