@@ -36,9 +36,7 @@ PROJECT_DIR=$(shell pwd)
36
36
BUILD_NUMBER =custom
37
37
38
38
# This version limit will only be honored on x86_64 builds.
39
- # arm64/M1 builds are only supporteded on macOS 11.0 or greater.
40
- MACOSX_DEPLOYMENT_TARGET-x86_64 =10.8
41
- MACOSX_DEPLOYMENT_TARGET-arm64 =11.0
39
+ MACOSX_DEPLOYMENT_TARGET =10.15
42
40
43
41
# Version of packages that will be compiled by this meta-package
44
42
# PYTHON_VERSION is the full version number (e.g., 3.10.0b3)
@@ -64,10 +62,12 @@ OS_LIST=macOS iOS tvOS watchOS
64
62
65
63
# macOS targets
66
64
TARGETS-macOS =macosx.x86_64 macosx.arm64
67
- CFLAGS-macOS =
68
- CFLAGS-macosx.x86_64=-mmacosx-version-min = $( MACOSX_DEPLOYMENT_TARGET-x86_64 )
69
- CFLAGS-macosx.arm64=-mmacosx-version-min = $( MACOSX_DEPLOYMENT_TARGET-arm64 )
65
+ CFLAGS-macOS=-mmacosx-version-min = $( MACOSX_DEPLOYMENT_TARGET )
66
+ CFLAGS-macosx.x86_64 =
67
+ CFLAGS-macosx.arm64 =
70
68
SLICE-macosx =macos-arm64_x86_64
69
+ SDK_ROOT-macosx =$(shell xcrun --sdk macosx --show-sdk-path)
70
+ CC-macosx =xcrun --sdk macosx clang --sysroot=$(SDK_ROOT-macosx ) $(CFLAGS-macOS )
71
71
72
72
# iOS targets
73
73
TARGETS-iOS =iphonesimulator.x86_64 iphonesimulator.arm64 iphoneos.arm64
@@ -106,6 +106,8 @@ MACHINE_SIMPLE-arm64=arm
106
106
MACHINE_DETAILED-arm64_32 =aarch64
107
107
MACHINE_SIMPLE-arm64_32 =arm
108
108
109
+
110
+
109
111
# The architecture of the machine doing the build
110
112
HOST_ARCH =$(shell uname -m)
111
113
@@ -800,8 +802,9 @@ $$(PYTHON_DIR-$(os))/Makefile: \
800
802
> $$(PYTHON_DIR-$(os ) ) /Modules/Setup.local
801
803
# Configure target Python
802
804
cd $$(PYTHON_DIR-$(os ) ) && \
803
- MACOSX_DEPLOYMENT_TARGET=$$ (MACOSX_DEPLOYMENT_TARGET- $$( ARCH- $( target ) ) ) \
805
+ MACOSX_DEPLOYMENT_TARGET=$(MACOSX_DEPLOYMENT_TARGET ) \
804
806
./configure \
807
+ CC=" $( CC-macosx) " LD=" $( CC-macosx) " \
805
808
--prefix=" $( PROJECT_DIR) /$$ (PYTHON_DIR-$( os) )/_install" \
806
809
--without-doc-strings --enable-ipv6 --without-ensurepip --enable-universalsdk --with-universal-archs=universal2 \
807
810
--with-openssl=../openssl/macosx \
0 commit comments