From abe1c26797d2d57c8c76c138c8f3d3db1a24860e Mon Sep 17 00:00:00 2001 From: clice-bot <306533837+clice-bot@users.noreply.github.com> Date: Fri, 9 Oct 2026 15:05:31 +0000 Subject: [PATCH] docs: sync xclang --- en/xclang/guide/comparisons.md | 14 +++++++------- en/xclang/guide/what-is-xclang.md | 2 +- en/xclang/guide/why-xclang.md | 2 +- en/xclang/index.md | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/en/xclang/guide/comparisons.md b/en/xclang/guide/comparisons.md index 5d5a9bbc3..554716f6b 100644 --- a/en/xclang/guide/comparisons.md +++ b/en/xclang/guide/comparisons.md @@ -9,7 +9,7 @@ the documentation of each project, linked. Corrections are welcome as | | what it is | targets out of the box | sysroots and SDKs | C++ runtime in programs | Linux programs run on | build systems | compiler built with PGO | |---|---|---|---|---|---|---|---| -| **xclang** | clang, lld and six targets' runtimes, prebuilt | Linux x64/arm64, Windows x64/arm64 (MinGW, MSVC), macOS x64/arm64 | bundled; Apple's and Microsoft's SDKs fetched by the user from the vendor, or Xcode's | libc++, static; for MSVC targets, Microsoft's STL, static | glibc 2.17+ | CMake package, Bazel module, conda | yes, PGO + ThinLTO, every host | +| **xclang** | clang, lld and eight targets' runtimes, prebuilt | Linux x64/arm64 (glibc, musl), Windows x64/arm64 (MinGW, MSVC), macOS x64/arm64 | bundled; Apple's and Microsoft's SDKs fetched by the user from the vendor, or Xcode's | libc++, static; for MSVC targets, Microsoft's STL by choice | glibc 2.17+, or none (musl, static) | CMake package, Bazel module, conda | yes, PGO + ThinLTO, every host | | **zig cc** 0.17 | Zig's driver around its clang | dozens: glibc, musl, MinGW, macOS, BSDs, WASI | libc sources and stubs bundled, built on first use | libc++, static | any glibc version chosen per target; 2.31 by default | `zig build`; `CC="zig cc"` | not stated | | **cargo-zigbuild** | zig cc as cargo's linker | Linux, macOS, as its README lists | through zig; macOS SDK from the user | through zig | glibc version chosen per target | cargo | as zig | | **cross-rs** | cargo in Docker images with GCC cross toolchains | most of Rust's Linux, Windows and other targets | per-target images; Apple and MSVC images built by the user | libstdc++ | 2.31; 2.17 in `:centos` images | cargo | no; GCC | @@ -34,15 +34,15 @@ work. It differs from xclang in how it gets there: builds what a target needs the first time, then caches it ([overview](https://ziglang.org/learn/overview/)). That is how it fits dozens of targets in a 55 MB download. xclang ships the runtimes of its - six targets prebuilt: no first-build delay, and the same bytes for + eight targets prebuilt: no first-build delay, and the same bytes for everyone. Fetching other targets as prebuilt archives is [planned](../design/roadmap.md#target-archives). -- **It has more targets today**: musl, any glibc version per target +- **It has more targets today**: any glibc version per target (`x86_64-linux-gnu.2.17`), the BSDs and WASI. It also builds for macOS from any host, with Apple's libc headers and a `libSystem` stub ([0.17.0 release notes](https://ziglang.org/download/0.17.0/release-notes.html)). - In xclang, the musl targets are in every archive from 23.1.2.10 on - ([musl targets](../reference/targets.md#musl-targets)), and a newer + xclang has musl in every archive since 23.1.2.10 + ([musl targets](../reference/targets.md#musl-targets)); a newer glibc and the BSDs are [considered](../design/roadmap.md#glibc-newer). xclang builds for macOS from any host too, with Apple's own SDK, which the user fetches @@ -121,8 +121,8 @@ ThinLTO on Linux and macOS (`clang/cmake/caches/Release.cmake`), and with PGO but no LTO on Windows. They carry no sysroot for another target, so a cross build needs one from elsewhere. An archive is 0.9 to 2 GB. -xclang 23.1.2.1 was built by them. xclang's archives are 86 to 94 MB, -carry six targets, and run on glibc 2.17. On compile speed they are close +xclang 23.1.2.1 was built by them. xclang's archives are 89 to 97 MB, +carry eight targets, and run on glibc 2.17. On compile speed they are close on Linux and macOS ([PGO](../design/pgo.md#what-it-buys) has the numbers). ## Distribution Clang and GCC Cross Toolchains diff --git a/en/xclang/guide/what-is-xclang.md b/en/xclang/guide/what-is-xclang.md index 5c11c61cf..727471b66 100644 --- a/en/xclang/guide/what-is-xclang.md +++ b/en/xclang/guide/what-is-xclang.md @@ -3,7 +3,7 @@ xclang is a clang toolchain for cross-compiling, the way rustup, cross-rs and cargo-zigbuild let Rust do it: one compiler for every target. One directory holds the compiler, the linker and the binary tools. It also -holds, for six targets, the *sysroot* (the C library's headers and +holds, for eight targets, the *sysroot* (the C library's headers and libraries) and the runtimes. Cross-compiling is a `--target` flag and nothing else: diff --git a/en/xclang/guide/why-xclang.md b/en/xclang/guide/why-xclang.md index 2f8de1913..96a3c181b 100644 --- a/en/xclang/guide/why-xclang.md +++ b/en/xclang/guide/why-xclang.md @@ -14,7 +14,7 @@ C++ builds. |---|---|---| | [Reproducible](#reproducible) | one pinned toolchain; Bazel builds that are the same bytes in any checkout | [the Bazel module](../design/bazel-module.md) | | [Portable programs](#portable-programs) | a program runs on any machine of its target, as one file | [hermeticity](../design/hermeticity.md) | -| [Cross-compiling is a flag](#cross-compiling-is-a-flag) | one compiler version for six targets, no sysroots to install | [cross-compiling](cross-compiling.md) | +| [Cross-compiling is a flag](#cross-compiling-is-a-flag) | one compiler version for eight targets, no sysroots to install | [cross-compiling](cross-compiling.md) | | [Correct build caches](#correct-build-caches) | a cache never serves objects of another compiler | [the Bazel module](../design/bazel-module.md#every-toolchain-file-is-an-input) | | [C++20 modules](#c-20-modules) | `import std` in CMake 3.28 or later without experimental switches, and in Bazel | [C++20 modules](../features/modules.md) | | [Fast](#fast) | clang and lld built with PGO and ThinLTO, on every host | [PGO](../design/pgo.md) | diff --git a/en/xclang/index.md b/en/xclang/index.md index 349425b83..f71c0afc5 100644 --- a/en/xclang/index.md +++ b/en/xclang/index.md @@ -18,7 +18,7 @@ hero: features: - title: Cross-Compiling - details: A --target flag is all it takes. The sysroots, libc++ and lld for all six targets come with the toolchain. + details: A --target flag is all it takes. The sysroots, libc++ and lld for all eight targets come with the toolchain. link: ./guide/cross-compiling - title: Self-Contained Programs details: "A program loads only what its OS has: glibc 2.17 or later, the Windows DLLs, or libSystem. Everything else is linked in."