python-build: honor SDKROOT when selecting Xcode SDK for zlib (#3591)

This commit is contained in:
danglduy authored and GitHub committed 2026-10-10 13:44:33 +03:00
1 parent 8000f98f4b
commit 68fbc9f35a
2 files changed
+48 -1

No files matched your search

+1 -1
View File
@@ -2011,7 +2011,7 @@ use_xcode_sdk_zlib() {
# If a custom compiler is used, including XCode SDK will likely break it
osx_using_default_compiler || return 1
local sdkroot="$(xcrun --sdk macosx --show-sdk-path 2>/dev/null || true)"
local sdkroot="${SDKROOT:-$(xcrun --sdk macosx --show-sdk-path 2>/dev/null || true)}"
[[ -z ${sdkroot} || ! -d ${sdkroot} ]] && return 1
# Since Xcode 16 / macOS SDK 15, Apple tightened how the linker uses SDK content: