summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2024-02-26 01:21:10 (GMT)
committerGitHub <noreply@github.com>2024-02-26 01:21:10 (GMT)
commitbee7bb3310b356e99e3a0f75f23efbc97f1b0a24 (patch)
tree97867cc02ffa0f96440aae9f2d75ac1d08265213 /Misc
parente921f09c8a7eb2ab24e8a782b65531ee5afb291a (diff)
downloadcpython-bee7bb3310b356e99e3a0f75f23efbc97f1b0a24.zip
cpython-bee7bb3310b356e99e3a0f75f23efbc97f1b0a24.tar.gz
cpython-bee7bb3310b356e99e3a0f75f23efbc97f1b0a24.tar.bz2
gh-114099: Add configure and Makefile targets to support iOS compilation. (GH-115390)
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Build/2024-02-13-14-52-59.gh-issue-114099.zjXsQr.rst2
-rw-r--r--Misc/platform_triplet.c15
2 files changed, 17 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Build/2024-02-13-14-52-59.gh-issue-114099.zjXsQr.rst b/Misc/NEWS.d/next/Build/2024-02-13-14-52-59.gh-issue-114099.zjXsQr.rst
new file mode 100644
index 0000000..e2858bd
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2024-02-13-14-52-59.gh-issue-114099.zjXsQr.rst
@@ -0,0 +1,2 @@
+Makefile targets were added to support compiling an iOS-compatible framework
+build.
diff --git a/Misc/platform_triplet.c b/Misc/platform_triplet.c
index 3307260..0b912e3 100644
--- a/Misc/platform_triplet.c
+++ b/Misc/platform_triplet.c
@@ -233,7 +233,22 @@ PLATFORM_TRIPLET=i386-gnu
# error unknown platform triplet
# endif
#elif defined(__APPLE__)
+# include "TargetConditionals.h"
+# if TARGET_OS_IOS
+# if TARGET_OS_SIMULATOR
+# if __x86_64__
+PLATFORM_TRIPLET=x86_64-iphonesimulator
+# else
+PLATFORM_TRIPLET=arm64-iphonesimulator
+# endif
+# else
+PLATFORM_TRIPLET=arm64-iphoneos
+# endif
+# elif TARGET_OS_OSX
PLATFORM_TRIPLET=darwin
+# else
+# error unknown Apple platform
+# endif
#elif defined(__VXWORKS__)
PLATFORM_TRIPLET=vxworks
#elif defined(__wasm32__)