Skip to content

0.10.3

Compare
Choose a tag to compare
@github-actions github-actions released this 19 Sep 19:35
· 138 commits to master since this release
42e0b40

Minimum bazel version: 6.0.0 (6.1.0 if using blzmod)

If you're using bzlmod, add the following to MODULE.bazel:

bazel_dep(name = "toolchains_llvm", version = "0.10.3")

# To directly use a commit from GitHub, replace commit with the commit you want.
# Otherwise, omit this block.
git_override(
  module_name = "toolchains_llvm",
  commit = "42e0b400fe316797657ccc5d7d2f9bb6f13071d8",
  remote = "https://github.com/grailbio/bazel-toolchain",
)

# 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 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 = "b7cd301ef7b0ece28d20d3e778697a5e3b81828393150bed04838c0c52963a01",
    strip_prefix = "toolchains_llvm-0.10.3",
    canonical_id = "0.10.3",
    url = "https://github.com/grailbio/bazel-toolchain/releases/download/0.10.3/toolchains_llvm-0.10.3.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()

And add the following section to your .bazelrc file:

# Not needed after https://github.com/bazelbuild/bazel/issues/7260 is closed
build --incompatible_enable_cc_toolchain_resolution

# For macOS only:

# Needed for Bazel versions before 7.
# Without this, one can use `--linkopt='-undefined dynamic_lookup'`.
# This feature is intentionally not supported on macOS.
build --features=-supports_dynamic_linker
# Not needed after https://github.com/grailbio/bazel-toolchain/pull/229.
build --features=-libtool

What's Changed

New Contributors

Full Changelog: 0.10.2...0.10.3