This project is no longer receiving updates. Development has been subsumed to https://github.com/cerisier/toolchains_llvm_bootstrapped which provides smaller, more optimized, and more feature complete toolchain distributions, as well as a fully featured Bazel cc_toolchain, with full support for LLVM runtimes, sanitizers, from-source bootstraps, and more.
If you are only interested in consuming a statically-linked prebuilt LLVM, look for an LLVM prebuilts release. If you are a Bazel user, check the README for directions how to integrate into your build.
Please migrate your usage and reach out to us on that repository!
This repository builds a custom LLVM distribution that comes with statically linked tools (clang, lld, llvm-ar, llvm-as, llvm-nm, llvm-objcopy). This is the minimum set needed to use the outputs as a Bazel cc toolchain with toolchains_llvm (previously grailbio/bazel-toolchain).
On Linux, we link against musl libc.
On OSX, fully statically linked executable is impossible. We dynamically link only libSystem.
The easiest way to consume this is to check the releases page for pre-built artifacts. See the example in toolchains_llvm for where the artifact URLs should be configured.
You can also compile from source as follows:
- Install Bazelisk
- (Optional, but highly recommended). Setup remote execution by making a free account with Buildbuddy. Add the following to your
.bazelrcor~/.bazelrc:build --remote_header=x-buildbuddy-api-key=YOUR_KEY_HERE - Build for your platform:
bazel build //:dist
You can also cross-compile for a different platform:
bazel build //:for_darwin_amd64bazel build //:for_darwin_arm64bazel build //:for_linux_arm64_muslbazel build //:for_linux_amd64_muslbazel build //:for_all_platforms(builds all of the above)
Please migrate to https://github.com/cerisier/toolchains_llvm_bootstrapped to continue following along our roadmap.