Minimum bazel version: 7.0.0
If you're using bzlmod
, add the following to MODULE.bazel
:
bazel_dep(name = "toolchains_llvm", version = "1.2.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 = "6edc43be7e52d9f44bc842a9956bd40213b972b1",
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 = "e3fb6dc6b77eaf167cb2b0c410df95d09127cbe20547e5a329c771808a816ab4",
strip_prefix = "toolchains_llvm-v1.2.0",
canonical_id = "v1.2.0",
url = "https://github.com/bazel-contrib/toolchains_llvm/releases/download/v1.2.0/toolchains_llvm-v1.2.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 abseil-cpp to v20240722 by @renovate in #367
- chore(deps): update dependency rules_rust to v0.49.0 by @renovate in #365
- chore(deps): update dependency rules_rust to v0.49.1 by @renovate in #368
- chore(deps): update dependency com_google_absl to v20240722 by @renovate in #366
- chore(deps): update dependency rules_rust to v0.49.2 by @renovate in #369
- chore(deps): update dependency rules_foreign_cc to v0.12.0 by @renovate in #373
- chore(deps): update dependency rules_rust to v0.49.3 by @renovate in #370
- Added support for 18.1.8, extended 18.1.7 by @svenpanne in #374
- Export share/clang/* from llvm_toolchain by @mrkkrp in #375
- Make LLD work with clang18 by @dzbarsky in #379
- Add new arm64 macOS binary by @keith in #381
- Update apple
release_name
for version >= 18 by @Danielkonge in #382 - Allow user provided platform constraints by @jkurland-roku in #371
- Add LLVM 19 by @mering in #392
- Allow debian to use LLVM 18 by @TylerSeanRau in #394
- Added option to skip linking against
libunwind
by @mmaslankaprv in #346 - Fix release notes template tag. by @sputt in #393
New Contributors
- @svenpanne made their first contribution in #374
- @mrkkrp made their first contribution in #375
- @Danielkonge made their first contribution in #382
- @jkurland-roku made their first contribution in #371
- @mering made their first contribution in #392
- @TylerSeanRau made their first contribution in #394
- @mmaslankaprv made their first contribution in #346
- @sputt made their first contribution in #393
Full Changelog: v1.1.2...v1.2.0