Skip to content

Commit 53e554e

Browse files
committed
Tweak FFI compilation settings for iOS/tvOS/watchOS
1 parent 9a79747 commit 53e554e

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ CC-macosx=xcrun --sdk macosx clang --sysroot=$(SDK_ROOT-macosx) $(CFLAGS-macOS)
6868

6969
# iOS targets
7070
TARGETS-iOS=iphonesimulator.x86_64 iphonesimulator.arm64 iphoneos.arm64
71-
CFLAGS-iOS=-mios-version-min=13.0 -fembed-bitcode
71+
CFLAGS-iOS=-mios-version-min=12.0 -fembed-bitcode
7272
CFLAGS-iphoneos.arm64=
7373
CFLAGS-iphonesimulator.x86_64=
7474
CFLAGS-iphonesimulator.arm64=

patch/Python/Setup.iOS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ _ctypes _ctypes/_ctypes.c \
1010
-I$(srcdir)/Modules/_ctypes/darwin \
1111
-I$(srcdir)/../Support/libFFI.xcframework/{{slice}}/Headers \
1212
-DPy_BUILD_CORE_MODULE \
13+
-DHAVE_FFI_CLOSURE_ALLOC=1 \
14+
-DHAVE_FFI_PREP_CIF_VAR=1 \
1315
-DHAVE_FFI_PREP_CLOSURE_LOC=1 \
16+
-DUSING_MALLOC_CLOSURE_DOT_C=1 \
1417
-L$(srcdir)/../Support/libFFI.xcframework/{{slice}} \
1518
-lFFI
1619

patch/Python/Setup.tvOS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ _ctypes _ctypes/_ctypes.c \
1010
-I$(srcdir)/Modules/_ctypes/darwin \
1111
-I$(srcdir)/../Support/libFFI.xcframework/{{slice}}/Headers \
1212
-DPy_BUILD_CORE_MODULE \
13+
-DHAVE_FFI_CLOSURE_ALLOC=1 \
14+
-DHAVE_FFI_PREP_CIF_VAR=1 \
1315
-DHAVE_FFI_PREP_CLOSURE_LOC=1 \
16+
-DUSING_MALLOC_CLOSURE_DOT_C=1 \
1417
-L$(srcdir)/../Support/libFFI.xcframework/{{slice}} \
1518
-lFFI
1619

patch/Python/Setup.watchOS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ _ctypes _ctypes/_ctypes.c \
1010
-I$(srcdir)/Modules/_ctypes/darwin \
1111
-I$(srcdir)/../Support/libFFI.xcframework/{{slice}}/Headers \
1212
-DPy_BUILD_CORE_MODULE \
13+
-DHAVE_FFI_CLOSURE_ALLOC=1 \
14+
-DHAVE_FFI_PREP_CIF_VAR=1 \
1315
-DHAVE_FFI_PREP_CLOSURE_LOC=1 \
16+
-DUSING_MALLOC_CLOSURE_DOT_C=1 \
1417
-L$(srcdir)/../Support/libFFI.xcframework/{{slice}} \
1518
-lFFI

0 commit comments

Comments
 (0)