summaryrefslogtreecommitdiffstats
path: root/iOS/Resources
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 /iOS/Resources
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 'iOS/Resources')
-rw-r--r--iOS/Resources/Info.plist.in34
-rwxr-xr-xiOS/Resources/bin/arm64-apple-ios-ar2
-rwxr-xr-xiOS/Resources/bin/arm64-apple-ios-clang2
-rwxr-xr-xiOS/Resources/bin/arm64-apple-ios-cpp2
-rwxr-xr-xiOS/Resources/bin/arm64-apple-ios-simulator-ar2
-rwxr-xr-xiOS/Resources/bin/arm64-apple-ios-simulator-clang2
-rwxr-xr-xiOS/Resources/bin/arm64-apple-ios-simulator-cpp2
-rwxr-xr-xiOS/Resources/bin/x86_64-apple-ios-simulator-ar2
-rwxr-xr-xiOS/Resources/bin/x86_64-apple-ios-simulator-clang2
-rwxr-xr-xiOS/Resources/bin/x86_64-apple-ios-simulator-cpp2
-rw-r--r--iOS/Resources/dylib-Info-template.plist26
-rw-r--r--iOS/Resources/pyconfig.h7
12 files changed, 85 insertions, 0 deletions
diff --git a/iOS/Resources/Info.plist.in b/iOS/Resources/Info.plist.in
new file mode 100644
index 0000000..3ecdc89
--- /dev/null
+++ b/iOS/Resources/Info.plist.in
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+<plist version="0.9">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleExecutable</key>
+ <string>Python</string>
+ <key>CFBundleGetInfoString</key>
+ <string>Python Runtime and Library</string>
+ <key>CFBundleIdentifier</key>
+ <string>@PYTHONFRAMEWORKIDENTIFIER@</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>Python</string>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleShortVersionString</key>
+ <string>%VERSION%</string>
+ <key>CFBundleLongVersionString</key>
+ <string>%VERSION%, (c) 2001-2024 Python Software Foundation.</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+ <key>CFBundleSupportedPlatforms</key>
+ <array>
+ <string>iPhoneOS</string>
+ </array>
+ <key>MinimumOSVersion</key>
+ <string>@IOS_DEPLOYMENT_TARGET@</string>
+</dict>
+</plist>
diff --git a/iOS/Resources/bin/arm64-apple-ios-ar b/iOS/Resources/bin/arm64-apple-ios-ar
new file mode 100755
index 0000000..8122332
--- /dev/null
+++ b/iOS/Resources/bin/arm64-apple-ios-ar
@@ -0,0 +1,2 @@
+#!/bin/sh
+xcrun --sdk iphoneos${IOS_SDK_VERSION} ar $@
diff --git a/iOS/Resources/bin/arm64-apple-ios-clang b/iOS/Resources/bin/arm64-apple-ios-clang
new file mode 100755
index 0000000..4d52575
--- /dev/null
+++ b/iOS/Resources/bin/arm64-apple-ios-clang
@@ -0,0 +1,2 @@
+#!/bin/sh
+xcrun --sdk iphoneos${IOS_SDK_VERSION} clang -target arm64-apple-ios $@
diff --git a/iOS/Resources/bin/arm64-apple-ios-cpp b/iOS/Resources/bin/arm64-apple-ios-cpp
new file mode 100755
index 0000000..891bb25
--- /dev/null
+++ b/iOS/Resources/bin/arm64-apple-ios-cpp
@@ -0,0 +1,2 @@
+#!/bin/sh
+xcrun --sdk iphoneos${IOS_SDK_VERSION} clang -target arm64-apple-ios -E $@
diff --git a/iOS/Resources/bin/arm64-apple-ios-simulator-ar b/iOS/Resources/bin/arm64-apple-ios-simulator-ar
new file mode 100755
index 0000000..74ed3bc
--- /dev/null
+++ b/iOS/Resources/bin/arm64-apple-ios-simulator-ar
@@ -0,0 +1,2 @@
+#!/bin/sh
+xcrun --sdk iphonesimulator${IOS_SDK_VERSION} ar $@
diff --git a/iOS/Resources/bin/arm64-apple-ios-simulator-clang b/iOS/Resources/bin/arm64-apple-ios-simulator-clang
new file mode 100755
index 0000000..32574ca
--- /dev/null
+++ b/iOS/Resources/bin/arm64-apple-ios-simulator-clang
@@ -0,0 +1,2 @@
+#!/bin/sh
+xcrun --sdk iphonesimulator${IOS_SDK_VERSION} clang -target arm64-apple-ios-simulator $@
diff --git a/iOS/Resources/bin/arm64-apple-ios-simulator-cpp b/iOS/Resources/bin/arm64-apple-ios-simulator-cpp
new file mode 100755
index 0000000..6aaf6fb
--- /dev/null
+++ b/iOS/Resources/bin/arm64-apple-ios-simulator-cpp
@@ -0,0 +1,2 @@
+#!/bin/sh
+xcrun --sdk iphonesimulator${IOS_SDK_VERSION} clang -target arm64-apple-ios-simulator -E $@
diff --git a/iOS/Resources/bin/x86_64-apple-ios-simulator-ar b/iOS/Resources/bin/x86_64-apple-ios-simulator-ar
new file mode 100755
index 0000000..74ed3bc
--- /dev/null
+++ b/iOS/Resources/bin/x86_64-apple-ios-simulator-ar
@@ -0,0 +1,2 @@
+#!/bin/sh
+xcrun --sdk iphonesimulator${IOS_SDK_VERSION} ar $@
diff --git a/iOS/Resources/bin/x86_64-apple-ios-simulator-clang b/iOS/Resources/bin/x86_64-apple-ios-simulator-clang
new file mode 100755
index 0000000..bcbe91f
--- /dev/null
+++ b/iOS/Resources/bin/x86_64-apple-ios-simulator-clang
@@ -0,0 +1,2 @@
+#!/bin/sh
+xcrun --sdk iphonesimulator${IOS_SDK_VERSION} clang -target x86_64-apple-ios-simulator $@
diff --git a/iOS/Resources/bin/x86_64-apple-ios-simulator-cpp b/iOS/Resources/bin/x86_64-apple-ios-simulator-cpp
new file mode 100755
index 0000000..e6a42d9
--- /dev/null
+++ b/iOS/Resources/bin/x86_64-apple-ios-simulator-cpp
@@ -0,0 +1,2 @@
+#!/bin/sh
+xcrun --sdk iphonesimulator${IOS_SDK_VERSION} clang -target x86_64-apple-ios-simulator -E $@
diff --git a/iOS/Resources/dylib-Info-template.plist b/iOS/Resources/dylib-Info-template.plist
new file mode 100644
index 0000000..f652e27
--- /dev/null
+++ b/iOS/Resources/dylib-Info-template.plist
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleExecutable</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string></string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSupportedPlatforms</key>
+ <array>
+ <string>iPhoneOS</string>
+ </array>
+ <key>MinimumOSVersion</key>
+ <string>12.0</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+</dict>
+</plist>
diff --git a/iOS/Resources/pyconfig.h b/iOS/Resources/pyconfig.h
new file mode 100644
index 0000000..4acff2c
--- /dev/null
+++ b/iOS/Resources/pyconfig.h
@@ -0,0 +1,7 @@
+#ifdef __arm64__
+#include "pyconfig-arm64.h"
+#endif
+
+#ifdef __x86_64__
+#include "pyconfig-x86_64.h"
+#endif