Theos

A cross-platform build system for creating iOS, macOS, Linux, and Windows programs.

32-bit Deployment

Older iOS devices (such as iPhone 5 and earlier, and iOS 10 and earlier) run 32-bit binaries (armv6, armv7, and armv7s). Because modern iOS SDKs and toolchains no longer target 32-bit iOS, building for these architectures requires an older Xcode toolchain or targeting 64-bit architectures only.

Building with Xcode 27 and newer

You may have been directed here by the following warning output by Theos:

Warning: Building for 32-bit architectures (armv7), but the current toolchain lacks ld-classic (Xcode 27+). Binaries may fail to link or crash on older iOS versions. More information: https://theos.dev/docs/32-bit-deployment

In Xcode 27, Apple removed the classic ld64 (ld-classic) linker from the toolchain, leaving only the newer ld_prime linker (-ld_classic is ignored). As a result:

  • armv6 is no longer supported by the linker.
  • armv7 and armv7s binaries are linked without classic lazy binding (__picsymbolstub5 / __nl_symbol_ptr instead of __stub_helper / __lazy_symbol), which crashes on older iOS versions (such as iOS 5 and 6).

There are two ways to resolve this:

  • Target 64-bit architectures only: If you do not need to support 32-bit devices (iOS 10 and earlier), raise your deployment target to iOS 11.0 or newer in TARGET, or set ARCHS explicitly at the top of your Makefile:

    export TARGET = iphone:clang:latest:11.0
    # or keep an older deployment target with 64-bit archs only:
    export ARCHS = arm64
    
  • Use Xcode 26.6 or earlier: If you need to build armv6, armv7, or armv7s binaries, use Xcode 26.6 (which still includes ld-classic) or earlier.

    After extracting Xcode 26.6 to /Applications/Xcode-26.6.app (avoid spaces in the .app path if passing it to Theos), switch to it or set DEVELOPER_DIR:

    sudo xcode-select -switch /Applications/Xcode-26.6.app/Contents/Developer
    
    # Or set DEVELOPER_DIR for a single build:
    DEVELOPER_DIR=/Applications/Xcode-26.6.app/Contents/Developer make package