gitwtfhub

wtf is osxcross?

lucor/osxcross — explained in plain English

Analysis updated 2026-07-18 · repo last pushed 2022-01-21

Audience · developerComplexity · 4/5DormantSetup · hard

TL;DR

A toolchain that lets you compile macOS software from Linux, FreeBSD, OpenBSD, or Android without owning a Mac.

Mindmap

mindmap
  root((repo))
    What it does
      Cross compiles for macOS
      Bundles Clang and SDK
      Automates setup
    Tech stack
      Clang
      LLVM
      macOS SDK
    Use cases
      Build without a Mac
      CI macOS testing
      Cross platform projects
    Audience
      Open source maintainers
      DevOps engineers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Compile macOS binaries for an open-source project without owning Mac hardware.

REASON 2

Set up a CI pipeline that tests macOS compatibility on Linux machines.

REASON 3

Cross-compile for multiple architectures like Intel, ARM64, or Apple ARM64e.

REASON 4

Add macOS builds to a Docker-based cross-platform build workflow.

What's in the stack?

ClangLLVMCC++

How it stacks up

lucor/osxcross0verflowme/alarm-clock0verflowme/seclists
LanguageCSS
Last pushed2022-01-212022-10-032020-05-03
MaintenanceDormantDormantDormant
Setup difficultyhardeasyeasy
Complexity4/52/51/5
Audiencedevelopervibe coderops devops

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · hard Time to first run · 1h+

Requires legally extracting Apple's macOS SDK from Xcode plus CMake and other build dependencies.

Wtf does this do

OSXCross lets you build software for macOS while sitting on a Linux, FreeBSD, OpenBSD, or Android machine. Instead of needing a Mac to compile code that runs on macOS, this toolchain handles the translation for you, similar to how a translator lets you write documents in one language that end up in another. At its core, the toolchain provides three essential pieces: the Clang/LLVM compiler (which already knows how to produce code for different targets), a set of macOS-specific build tools like a linker and file manipulator, and the macOS SDK, basically a library of code that macOS programs depend on. The project includes scripts that automate the tedious work of gathering these pieces, configuring them correctly, and stitching them together into a working compiler setup. Once installed, you can compile C, C++, or other code just as you would on a Mac, but the resulting programs run on macOS instead of your current system. The toolchain supports multiple processor architectures: it can run on Intel or ARM-based Linux machines and produce binaries for Intel (32-bit or 64-bit), ARM64, or even Apple's specialized ARM64e chips. This makes it especially useful for open-source projects that need macOS builds but don't have Mac hardware available, or for continuous integration systems that want to test macOS compatibility without owning multiple machines. Projects like Smartmontools and Docker-based build systems use it to compile for macOS as part of larger cross-platform workflows. Getting started requires extracting Apple's macOS SDK (legally obtained from Xcode) and running the build scripts. The process involves a few dependencies like CMake and development libraries, but the project provides automated setup for most common Linux distributions. Once running, you use familiar compiler commands like o64-clang++ instead of clang++ to specify that you're targeting macOS.

Yoink these prompts

Prompt 1
Walk me through extracting the macOS SDK from Xcode and setting up this toolchain on Linux.
Prompt 2
Explain how o64-clang++ differs from a normal clang++ command when targeting macOS.
Prompt 3
Help me add osxcross to my CI pipeline to produce macOS builds without a Mac.
Prompt 4
What architectures can this toolchain target, and how do I choose the right one for my project?

Frequently asked questions

wtf is osxcross?

A toolchain that lets you compile macOS software from Linux, FreeBSD, OpenBSD, or Android without owning a Mac.

Is osxcross actively maintained?

Dormant — no commits in 2+ years (last push 2022-01-21).

How hard is osxcross to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is osxcross for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.