Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

One Toolchain for Every Platform. In C++. Even in the Browser.

Description and use

Separating host and target in C++ cross‑compilation reduces required artifacts from 200 to 30, enabling builds for 20 platforms from any host, including a browser, while respecting Windows and macOS licensing constraints.

Problem

Building a C++ application for multiple platforms from a single machine is difficult because each target requires a separate sysroot and compiler build, leading to large build times and complex toolchains.

Outcome

A universal C++ toolchain that separates host and target artifacts reduces build complexity from 200 to 30 tarballs, enabling compilation for 20 targets from any host, including browsers, while respecting legal constraints on Windows and macOS SDKs.

Workflow

  • 1. Build the host compiler for the current machine (build).
  • 2. Build the target compiler for the same architecture.
  • 3. Build host compilers for all other architectures using the already built targets.
  • 4. Separate host artifacts (compiler, linker, build driver, binutils, resource headers) from target artifacts (sysroot, headers, libraries).
  • 5. Use the host compiler to build applications for any target, regardless of host OS.
  • 6. Optionally run the compiler in a browser via Emscripten or similar.
  • 7. Distribute the target tarballs only if legal licenses allow (e.g., Windows SDK restrictions).

Evidence

The whole concept of cross‑compilation revolves around the triplet…

Source

If target and host are separated, it's 30 tarballs, and only 10 of them are heavy builds.

Source

The whole thing can be done on one machine in one OS, though only if that OS is Linux.

Source

The project explicitly asks you to confirm you accept Microsoft's license.

Source

  • Record date: 2026-10-05T15:10:46.178Z