The repository separates toolchain configuration logic from toolchain binary distributions.
It exists to answer three practical needs:
- provide a single Bazel-native way to declare Linux and QNX C/C++ toolchains,
- keep package provenance, compiler flags, and platform constraints consistent,
- validate those toolchains through an example workspace instead of relying on ad hoc local setup.
The repository does not contain GCC, QCC, or QNX SDK binaries. Instead, it
contains the layers Bazel needs in order to fetch those binaries and expose
them as cc_toolchain targets:
- module extension logic in
extensions/ - repository rules in
rules/ - package metadata in
packages/ - generated-file templates in
templates/ - authentication helpers in
tools/ - an example validation workspace in
examples/
The current repository surface supports these platform families:
- Linux AMD64 (
x86_64-linux) with packaged GCC toolchains - Linux ARM64 (
aarch64-linux) with packaged GCC toolchains - Linux runtime-specific variants (
x86_64-linux,aarch64-linux) such asAutoSDandEB corbos Linux for Safety Applications - QNX AMD64 (
x86_64-qnx) with packaged or locally built SDP-based toolchains - QNX ARM64 (
aarch64-qnx) with packaged or locally built SDP-based toolchains
The configuration pipeline is intentionally layered:
- A consuming project declares toolchains in
MODULE.bazel. - The
gccmodule extension interprets those declarations. - Package metadata is resolved from either the default version matrix or a manually declared package.
- Repository rules generate a Bazel repository containing the toolchain definition and platform-specific configuration files.
- The consuming project activates those toolchains via
--extra_toolchainsand compatible platform constraints.
This keeps the consuming workspace small while centralizing platform policy, default flags, sysroot wiring, and repository authentication behavior.