Skip to content

Investigate: free-threaded CPython builds for Android and iOS built by us #163

Closed

Description

@b-re-w

ROADMAP 9.2: no free-threaded prebuilt exists for Android (python.org) or iOS (Python-Apple-support / python.org). Unverified: whether CPython's Android and iOS build scripts accept --disable-gil and produce a working libpython3.14t. If they do, toolchain/binary can publish them and the default can be reconsidered on mobile.
Completion: a written result (works / does not, with the build log) for Android arm64 and iOS arm64; no product change.

Activity

  1. b-re-w commented on Oct 17, 2026

    @b-re-w
    MemberAuthor

    Result: free-threaded CPython 3.15.0 builds for both, through CPython's own Platforms/Android and Platforms/Apple tooling with --disable-gil (workflow build-ft-mobile.yml, #204, #208; docs/platforms/free-threaded-mobile.md).

    • Android aarch64-linux-android: run 39013371415, prefix/lib/libpython3.15t.so, pyconfig.h has #define Py_GIL_DISABLED 1. sha256 40995c530c3e454d829b4fdea8404d8c0b0e58f60c2d41d400daa1fb0ab65991 (python-3.15.0-aarch64-linux-android.tar.gz).
    • iOS XCframework (ios-arm64, ios-arm64_x86_64-simulator): run 39014667720, libpython3.15t.dylib per slice, lib/python3.15t, Py_GIL_DISABLED checked in each pyconfig-.h. Two packaging patches for the t suffix (version_tag, testbed grep). sha256 b8c0a4b32d31738f6ead7ace28acee0cb2a590bd0ca7015e9c32af613445e6b5 (python-3.15.0-iOS-XCframework.tar.gz).

    Not verified yet: running on a device, emulator or simulator; loading through the Gradle plugin's PYTHONHOME staging. Artifacts expire after 90 days; a stable download location is pending a decision.

  2. b-re-w commented on Oct 25, 2026

    @b-re-w
    MemberAuthor

    Conclusion (from existing builds and the release; no new build):

    • Android arm64: works (builds). CPython 3.15.0 with --disable-gil through Platforms/Android: job 'Android aarch64 (free-threaded)' succeeded in run 39013371415 (a8f88b1; the run's overall 'failure' is its iOS job, fixed in the next run). The log shows sysconfig[Py_GIL_DISABLED]: 1 and the libpython3.15t.so link with NDK 27.3 (aarch64-linux-android24-clang). Published as python-3.15.0t-aarch64-linux-android.tar.gz, sha256 40995c530c3e454d829b4fdea8404d8c0b0e58f60c2d41d400daa1fb0ab65991.
    • iOS arm64 (+ arm64/x86_64 simulator): works (builds). Through Platforms/Apple with two packaging patches for the t suffix: run 39014667720 (9ee0af6) succeeded. The log shows sysconfig[Py_GIL_DISABLED]: 1 and libpython3.15t.dylib per slice (arm64-iphoneos, arm64-iphonesimulator). Published as python-3.15.0t-iOS-XCframework.tar.gz, sha256 b8c0a4b32d31738f6ead7ace28acee0cb2a590bd0ca7015e9c32af613445e6b5.
    • Stable location: release cpython-3.15.0t-mobile (https://github.com/thisisthepy/python-multiplatform/releases/tag/cpython-3.15.0t-mobile), so the 90-day artifact expiry no longer matters.

    Not covered by this investigation (no product change was in scope): running either build on a device, emulator or simulator, and loading it through the Gradle plugin's PYTHONHOME staging. The default on mobile stays GIL.

  3. b-re-w commented on Oct 25, 2026

    @b-re-w
    MemberAuthor

    Closed with the written result above (builds work for Android arm64 and iOS arm64; runtime on device/simulator not verified).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions