Roadmap
Every target and feature that no release carries yet has one row on this page, with one status word. Other pages link to that row instead of restating the status. What is already in a release is documented on its own page, and what each release changed is in the CHANGELOG.
| status | meaning |
|---|---|
| Supported | In a release. |
| Unreleased | On main and tested by CI, but no release carries it. |
| Planned | Decided, and in no release yet. It may be in progress on a branch. |
| In research | Wanted. Whether it can be done well is still open. |
| Considered | Wanted. Its form or its cost is still open. |
| Not planned | Out of scope by design. |
The Vision
xclang's goal is to give clang what rustup, cross-rs and cargo-zigbuild give Rust: one compiler for every target. The common targets ship in every host archive, vendor SDKs that cannot be redistributed are fetched from the vendor by the user, and C++ runtimes can be built from source on demand (what is xclang?, cross-compiling). Additional targets beyond the bundled set will be published as separate target archives fetched when a build needs them. Every target follows the hermeticity rule: a program depends at run time only on the OS libraries that cannot be redistributed, and links everything else statically.
Targets
A target's tier describes how CI tests it (targets and hosts): Tier 1 runs tests natively on a GitHub-hosted runner (including x86 binaries on x86_64 Windows and WebAssembly binaries under wasmtime), Tier 2 runs tests under emulation or virtualization, and Tier 3 compiles and links without running. A Tier 3 target may build its runtimes from source on demand rather than shipping prebuilt archives. "The user (SDK)" means the target requires a vendor SDK fetched by the user under the vendor's license.
- A newer glibc:
x86_64andaarch64Linux targets for programs that need features absent from glibc 2.17, such as-static-pieand newer C library interfaces, paired with the same staticlibc++andcompiler-rt. - Other Linux architectures: each uses the oldest glibc version available for its architecture (
riscv64andloongarch64have no glibc 2.17), with the sanitizerscompiler-rtsupports on that architecture. - WebAssembly:
wasm32-wasip2links withwasm-component-ldbundled in each host archive; C++ exceptions are opt-in. - Android: builds against the NDK's sysroot with xclang's static
libc++configured in the NDK's inline ABI namespace (__ndk1). - iOS and Apple's other device platforms: their SDKs ship only in full Xcode (which requires an Apple ID to download), and their C++ runtimes will likely be built from source on demand.
- Windows 7 and XP: the MSVC target linked against the static CRT and YY-Thunks for APIs missing on older Windows versions (
mingw-w64withlibc++cannot target XP; Windows 9x is out of scope). msvcrt: xclang's MinGW targets use UCRT (Windows 10 and later); a MinGW variant targeting the legacymsvcrt.dllis not planned.- Emscripten:
emsdkprovides its own complete toolchain, so Emscripten is not an xclang target.
The xclang Command
| item | status |
|---|---|
Target archives and a release index, for xclang target add | Planned |
| Fetched targets in the CMake package and the Bazel module | Planned |
xclang target add is built to unpack a per-target archive of the same release into the toolchain directory (sysroot, prebuilt runtimes, compiler-rt, config files and C runtime license notices) using a release manifest that records each target archive's URL, sha256, size, tier and required vendor SDK. Once releases publish target archives, the CMake package and the Bazel module will configure and register fetched targets alongside the bundled ones.
Runtimes and Tools
- Runtimes from source for MSVC targets, and ThinLTO in Bazel: extending runtimes from source to compile
libc++onvcruntimewithclang-clagainst the fetched Windows SDK; and exposing source-built runtimes in Bazel ascc_librarydependencies so Bazel runs ThinLTO backend actions on their bitcode objects. - Sanitizers for musl targets: ASan, TSan and LSan intercept C library functions through
dlsym, which static musl executables do not have (sanitizers). Supporting them requires a musl target variant that links dynamically againstlibc.soas Alpine Linux does. libgcc_s.aas a linker script: replacing the emptylibgcc_s.aarchive in the Linux sysroots withINPUT(-lunwind)so manual Cargo configurations for*-unknown-linux-gnulink without adding-Clink-arg=-l:libunwind.a(withoutxclang cargo).- Not planned: xclang is a compiler toolchain, and editor or linter tools link
libclangdirectly;libc++is linked statically into each binary rather than shared across dynamic libraries (onelibc++per shared object); conda-forge recipes use conda-forge's dynamically linked compiler packages; andlibclangis built for the six hosts (MinGW on Windows, for clice) rather than the MSVC ABI.
Speed
| item | status |
|---|---|
| A PGO training that covers Objective-C, clang-cl, Mach-O links and libclang's clang-tidy checks | Planned |
| BOLT for the Linux hosts' clang and lld, on top of PGO and ThinLTO | In research |
The PGO training corpus is widened between releases.
Reproducibility and Supply Chain
| item | status |
|---|---|
| Relative paths in the debug information of CMake builds | Planned |
| Immutable GitHub releases | Planned |
| SLSA provenance attestations | Planned |
- Relative debug paths in CMake: CMake builds currently record the build directory's absolute paths in DWARF and Mach-O debug maps, whereas Bazel builds record paths relative to the execution root (paths in debug information).
- Immutable GitHub releases and SLSA provenance: preventing a published archive and
SHA256SUMSfrom being replaced together on GitHub (checking a download), and attaching verifiable build provenance attestations tying each release asset to its commit and GitHub Actions workflow run.
Following LLVM
| item | status |
|---|---|
| LLVM 24.x, and every 23.1 release still to come, each as it is released | Planned |
Each upstream LLVM release is built with the patch series checked against it, dropping patches that upstream has merged.
Open Questions
Design choices inside the items above:
- Android's sysroot: whether
xclang sdk fetchdownloads only the needed files from Google's NDK or xclang redistributes the sysroot directly. - The runtimes of Apple's device platforms: whether to publish prebuilt archives or build them only from source on demand, since Apple's license treats device platform libraries separately from macOS libraries.
- A glibc newer than 2.17: whether a build selects it with a named config file (
--config=) or a distinct target triple spelling. - Where fetched targets are stored: inside the toolchain directory only, or also in a user-selected directory.
