tpoechtrager/cctools-port logo

tpoechtrager/cctools-port

Free

Apple cctools port for Linux and *BSD

FreeFree tier
Type
Open Source

About tpoechtrager/cctools-port

cctools-port is an open-source port of Apple's cctools (compiler tools) and ld64 (linker) to Linux, FreeBSD, OpenBSD, macOS, and iOS. It enables developers to cross-compile for Apple platforms such as macOS, iOS, tvOS, watchOS, and more from non-Apple systems. The port supports multiple host architectures (x86, x86_64, ARM, ARM64, PowerPC) and a wide range of target architectures including armv7, arm64, x86_64, and riscv32 (via ld64). It requires Clang 10+, C++20 support, and optionally the TAPI library for SDK stubs. Originally created by cjacker and later maintained by tpoechtrager, the project provides a build system via configure and make, and has seen 807 stars and 182 forks on GitHub.

Key Features

Ports Apple's cctools and ld64 to Linux, FreeBSD, OpenBSD, macOS, and iOS
Supports cross-compilation for Apple platforms: macOS, iOS, tvOS, watchOS, bridgeOS, Mac Catalyst, DriverKit
Runs on host architectures: x86, x86_64, ARM, ARM64, PowerPC/PowerPC64
Targets a wide range of Apple device architectures: armv6–arm64e, i386, x86_64, x86_64h, riscv32 (ld64)
Uses Clang 10+ with C++20 support and integrates with LLVM for LTO
Supports TAPI library for SDKs with .tdb stubs
Provides configure-based build system with optional dependencies for uuid, xar, and bitcode support
Open-source under a permissive license with active community contributions

Pros & Cons

Pros
  • Enables cross-platform Apple development without a Mac
  • Supports a broad range of Apple target architectures and OS versions
  • Open-source and freely available
  • Clear installation instructions and dependency documentation
  • Active GitHub repository with releases and community contributions
Cons
  • Requires Clang 10+ and C++20 support, which may not be default on older systems
  • Some target combinations are marked as untested, reliability may vary
  • Dependency on external libraries (TAPI, musl-fts, etc.) can complicate setup
  • No official binary packages; requires manual compilation from source

Best For

Cross-compiling Apple platform software from Linux or BSD systemsDeveloping for iOS, tvOS, watchOS without using macOSBuilding and linking code for embedded Apple devices (ARM, arm64)Creating a custom toolchain for Apple platform development in CI/CD pipelinesPorting or testing software targeting Apple architectures on non-Apple hosts

FAQ

What is cctools-port?
It is a port of Apple's cctools (compiler tools) and ld64 (linker) to Linux, FreeBSD, OpenBSD, macOS, and iOS, allowing cross-compilation for Apple platforms from non-Apple host systems.
Which host operating systems are supported?
Linux, FreeBSD, OpenBSD, macOS, and iOS are supported as host operating systems.
Which target platforms can I build for?
Target operating systems include macOS, iOS, tvOS, watchOS, bridgeOS, Mac Catalyst, iOS Simulator, watchOS Simulator, and DriverKit. Target architectures cover armv6 through arm64e, i386, x86_64, and riscv32 (via ld64).
What are the main dependencies?
Clang 10+, libstdc++ or libc++ with C++20 support, libdispatch-dev and libblocksruntime. For SDKs with .tdb stubs, the TAPI library is required. musl-libc systems need musl-fts. Optional dependencies include llvm-devel (for LTO), uuid-devel (for -random_uuid), and xar-devel (for -bitcode_bundle).
How do I install cctools-port?
Clone the repository, then run './configure' and 'make install' within the cctools directory. Optionally install the TAPI library first if needed. See the README for detailed steps.