diff --git a/MODULE.bazel b/MODULE.bazel index d0e9fbe3a2d..e04dff34f42 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -23,6 +23,19 @@ register_toolchains( "@rules_foreign_cc//toolchains:preinstalled_make_toolchain", ) + +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 = "18.1.8", +) + +use_repo(llvm, "llvm_toolchain") + +register_toolchains("@llvm_toolchain//:all") + # Use HEAD to include this commit which is needed for preinstalled toolchains to work # https://github.com/bazel-contrib/rules_foreign_cc/commit/d03f7ae79ddda0ad228b17048b9e2dc0efcc8e95 #