Minimum bazel version: 7.0.0
If you're using bzlmod
, add the following to MODULE.bazel
:
bazel_dep(name = "toolchains_llvm", version = "1.4.0")
# Configure and register the toolchain.
llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm")
llvm.toolchain(
llvm_version = "16.0.0",
)
use_repo(llvm, "llvm_toolchain")
# use_repo(llvm, "llvm_toolchain_llvm") # if you depend on specific tools in scripts
register_toolchains("@llvm_toolchain//:all")
To directly use a commit from GitHub, add this block and replace commit with the commit you want.
git_override(
module_name = "toolchains_llvm",
commit = "4c3d6cfc62d4639106d807476aa1702dfc2c884b",
remote = "https://github.com/bazel-contrib/toolchains_llvm",
)
If not using bzlmod
, include this section in your WORKSPACE
:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "toolchains_llvm",
sha256 = "fded02569617d24551a0ad09c0750dc53a3097237157b828a245681f0ae739f8",
strip_prefix = "toolchains_llvm-v1.4.0",
canonical_id = "v1.4.0",
url = "https://github.com/bazel-contrib/toolchains_llvm/releases/download/v1.4.0/toolchains_llvm-v1.4.0.tar.gz",
)
load("@toolchains_llvm//toolchain:deps.bzl", "bazel_toolchain_dependencies")
bazel_toolchain_dependencies()
load("@toolchains_llvm//toolchain:rules.bzl", "llvm_toolchain")
llvm_toolchain(
name = "llvm_toolchain",
llvm_version = "16.0.0",
)
load("@llvm_toolchain//:toolchains.bzl", "llvm_register_toolchains")
llvm_register_toolchains()
What's Changed
- chore(deps): update dependency rules_java to v8.7.2 by @renovate in #449
- chore(deps): update dependency rules_java to v8.8.0 by @renovate in #450
- Add linux-aarch64 for 19.1.3 by @jwnimmer-tri in #458
- Add LLVM 19.1.4...19.1.7 by @helly25 in #461
- Doc update by @helly25 in #462
- Add more tools by default by @helly25 in #463
- Support WebAssembly target platforms wasm{32,64}-wasip1 by @piob-io in #466
- Update llvm_distributions.bzl to support clang 19 for Linux ARM64 by @jayakasadev in #467
- Silence "canonical reproducible form" warning from repo rule by @jwnimmer-tri in #468
- Add LLVM 20.1.0 by @AlexDenisov in #469
- Add the missing 20.1.0 parts. by @helly25 in #470
- Emit canonical labels if needed in
pkg_name_from_label
by @fmeum in #447 - Add 20.1.1 by @helly25 in #475
- Add initial support for linux-armv7 by @UebelAndre in #477
- chore(deps): update dependency com_google_googletest to v1.16.0 by @renovate in #455
- Add new version 20.1.2 and missing parts of 20.1.1 by @helly25 in #478
- Create sanitized response file instead of expanding arguments by @dfreese in #480
New Contributors
- @jwnimmer-tri made their first contribution in #458
- @piob-io made their first contribution in #466
- @jayakasadev made their first contribution in #467
- @AlexDenisov made their first contribution in #469
- @UebelAndre made their first contribution in #477
- @dfreese made their first contribution in #480
Full Changelog: v1.3.0...v1.4.0