Includes clang-format, clang-tidy, clang-query and clang-apply-replacements.
| Clang Tools | OS/Version | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| clang-format | Linux 64 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| Window 64 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | |
| macOS ARM64 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | |
| macOS x86_64 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | |
| clang-tidy | Linux 64 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| Window 64 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | |
| macOS ARM64 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | |
| macOS x86_64 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | |
| clang-query | Linux 64 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| Window 64 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | |
| macOS ARM64 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | |
| macOS x86_64 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | |
| clang-apply-replacements | Linux 64 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| Window 64 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | |
| macOS ARM64 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | |
| macOS x86_64 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
Note
Removed support v7 (released in May 2019) by February 2025.
Removed support v8 (released in July 2019) by September 2025.
Removed support v9 (released in September 2019) in March 2026.
Removed support v10 (released in March 2020) in March 2026.
- Download clang-tools static binaries for your platform from the Releases tab.
- Alternatively, use the pip or asdf to download and manage them.
I used to contribute to different repositories and they often use different versions of clang-format.
I could either compile clang-format for each one I want to have or I could try messing up with my package system (I use Arch Linux btw) and try installing all of them on my system. This can very quickly get out of hand, hence I created this repository.
These binaries aim to:
- be as small as possible
- not require any additional dependencies apart from OS itself
This repository (cpp-linter/clang-tools-static-binaries) is forked from muttleyxd/clang-tools-static-binaries.
A Python build script is provided so you can reproduce any build on your own machine without needing GitHub Actions.
Prerequisites (install once per platform):
| Platform | Requirements |
|---|---|
| Linux x86-64 | gcc-10, cmake, make |
| macOS ARM64 | Homebrew, gcc@14, cmake |
| macOS x86-64 | Homebrew, gcc@14, cmake |
| Windows x86-64 | Visual Studio with C++ tools, cmake |
Run the script:
# build clang-tools version 18 for the auto-detected host OS
python build.py --version 18
# explicitly target a platform
python build.py --version 17 --os macosx
# write downloads and build artifacts to a custom directory
python build.py --version 20 --os linux --build-dir /tmp/llvm-buildRun python build.py --help for the full list of options.
The script performs exactly the same steps as the CI workflow:
downloads the LLVM source, applies any necessary patches, configures and
builds with CMake, smoke-tests each binary, and writes the renamed
binaries and their sha512sum files into <release>/build/bin/.
- Verify sha512sums of binaries against output from GitHub Actions to make sure binaries are not modified
- Fork this repository and run GitHub actions on your behalf
- Build and test manually using
python build.py(see above) or the steps in .github/workflows