Build scripts for a slim LLVM-based toolchain targeting AVR and ARM (Arduino).
./build.sh llvm # Build complete LLVM toolchain
./build.sh llvm --head-source # Build LLVM from a shallow git checkout of HEAD
./build.sh sysroot-avr # Build AVR sysroot
./build.sh sysroot-avr --head-source # avr-libc from git HEAD (nightly)
./build.sh --help # See all optionstc-build/
├── build.sh # Local build entry point
├── versions.conf # All versions and URLs for source tarballs
├── common/ # Shared scripts
│ ├── utils.sh # Common functions
│ ├── build-deps.sh # Build dependencies
│ └── push-build.sh # Package and release
├── llvm/ # LLVM build scripts
├── sysroot/ # Sysroot build scripts
├── binutils/ # BFD linker build
└── dockerfiles/ # Docker builds for CI
| Component | Selection |
|---|---|
| Compiler | Clang/Clang++ |
| Binary Tools | LLVM Tools |
| Linker | LLD (default), BFD (AVR only) |
| Libc Library | avr-libc (AVR), newlib (ARM) |
| Runtime Library | libgcc |
Due to incomplete AVR linker script support in LLD, the toolchain includes the GNU BFD linker as a workaround. Once LLD fully supports AVR linker scripts, BFD will be removed.
A clang-wrapper is included to improve compatibility with the Arduino build system by handling specific flag adjustments.
- LLVM Toolchain - Statically linked Clang/LLVM binaries
- Sysroot - Target libraries (avr-libc/newlib + libgcc)
- BFD Linker - Optional GNU linker for AVR
Packages are published as GitHub releases in two flavors:
- Stable — pinned upstream releases from
versions.conf, tagged likellvm-<ver>-<date>. - Nightly — LLVM and avr-libc built from upstream git HEAD (libgcc stays on
a pinned GCC release), tagged with a
nightly-prefix so the BoardManagerFiles updater can pick them out.
Check for Updatesopens a PR when upstream versions change.- The LLVM and sysroot pipelines run on a daily schedule as nightly builds and
can also be dispatched manually (
nightlyinput toggles the flavor). - After a successful publish, the pipelines send a
repository_dispatchto BoardManagerFiles (requires the org secretCBA_DISPATCH_TOKEN) so the package index refreshes itself.
Apache-2.0 - See LICENSE