@@ -24,11 +24,11 @@ Minimum bazel version: **6.0.0** (6.1.0 if using blzmod)
24
24
If you're using ` bzlmod ` , add the following to ` MODULE.bazel ` :
25
25
26
26
``` starlark
27
- bazel_dep(name = " llvm_toolchain " , version = " 0.9 " )
27
+ bazel_dep(name = " toolchains_llvm " , version = " 0.10.0 " )
28
28
29
- llvm = use_extension(" @llvm_toolchain //toolchain/extensions:llvm.bzl" , " llvm" )
29
+ llvm = use_extension(" @toolchains_llvm //toolchain/extensions:llvm.bzl" , " llvm" )
30
30
llvm.toolchain(
31
- llvm_version = " 15 .0.6 " ,
31
+ llvm_version = " 16 .0.0 " ,
32
32
)
33
33
34
34
use_repo(llvm, " llvm_toolchain" )
@@ -46,25 +46,25 @@ BAZEL_TOOLCHAIN_TAG = "0.9"
46
46
BAZEL_TOOLCHAIN_SHA = " 95f0bab6982c7e5a83447e08bf32fa7a47f210169da5e5ec62411fef0d8e7f59"
47
47
48
48
http_archive(
49
- name = " com_grail_bazel_toolchain " ,
49
+ name = " toolchains_llvm " ,
50
50
sha256 = BAZEL_TOOLCHAIN_SHA ,
51
51
strip_prefix = " bazel-toolchain-{tag} " .format(tag = BAZEL_TOOLCHAIN_TAG ),
52
52
canonical_id = BAZEL_TOOLCHAIN_TAG ,
53
53
url = " https://github.com/grailbio/bazel-toolchain/archive/refs/tags/{tag} .tar.gz" .format(tag = BAZEL_TOOLCHAIN_TAG ),
54
54
)
55
55
56
- load(" @com_grail_bazel_toolchain //toolchain:deps.bzl" , " bazel_toolchain_dependencies" )
56
+ load(" @toolchains_llvm //toolchain:deps.bzl" , " bazel_toolchain_dependencies" )
57
57
58
58
bazel_toolchain_dependencies()
59
59
60
- load(" @com_grail_bazel_toolchain //toolchain:rules.bzl" , " llvm_toolchain" )
60
+ load(" @toolchains_llvm //toolchain:rules.bzl" , " llvm_toolchain" )
61
61
62
62
llvm_toolchain(
63
63
name = " llvm_toolchain" ,
64
64
llvm_version = " 16.0.0" ,
65
65
)
66
66
67
- load(" @llvm_toolchain //:toolchains.bzl" , " llvm_register_toolchains" )
67
+ load(" @toolchains_llvm //:toolchains.bzl" , " llvm_register_toolchains" )
68
68
69
69
llvm_register_toolchains()
70
70
```
@@ -194,7 +194,7 @@ The following mechanisms are available for using an LLVM toolchain:
194
194
attribute. When using a bazel package path, each of the values is typically
195
195
a package in the user's workspace or configured through ` local_repository ` or
196
196
` http_archive ` ; the BUILD file of the package should be similar to
197
- ` @com_grail_bazel_toolchain //toolchain:BUILD.llvm_repo ` . If using only
197
+ ` @toolchains_llvm //toolchain:BUILD.llvm_repo ` . If using only
198
198
` http_archive ` , maybe consider using the ` urls ` attribute instead to get more
199
199
flexibility if you need.
200
200
4 . All the above options rely on host OS information, and are not suited for
@@ -233,7 +233,7 @@ the [test script](tests/scripts/run_xcompile_tests.sh) for cross-compilation.
233
233
234
234
``` sh
235
235
bazel build \
236
- --platforms=@com_grail_bazel_toolchain //platforms:linux-x86_64 \
236
+ --platforms=@toolchains_llvm //platforms:linux-x86_64 \
237
237
--extra_toolchains=@llvm_toolchain_with_sysroot//:cc-toolchain-x86_64-linux \
238
238
//...
239
239
```
0 commit comments