File tree 2 files changed +12
-9
lines changed 2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -3,15 +3,7 @@ Minimum bazel version: **7.0.0**
3
3
If you're using `bzlmod`, add the following to `MODULE.bazel`:
4
4
5
5
```starlark
6
- bazel_dep(name = "toolchains_llvm", version = "{tag}")
7
-
8
- # To directly use a commit from GitHub, replace commit with the commit you want.
9
- # Otherwise, omit this block.
10
- git_override(
11
- module_name = "toolchains_llvm",
12
- commit = "{commit}",
13
- remote = "https://github.com/bazel-contrib/toolchains_llvm",
14
- )
6
+ bazel_dep(name = "toolchains_llvm", version = "{version}")
15
7
16
8
# Configure and register the toolchain.
17
9
llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm")
@@ -25,6 +17,15 @@ use_repo(llvm, "llvm_toolchain")
25
17
register_toolchains("@llvm_toolchain//:all")
26
18
```
27
19
20
+ To directly use a commit from GitHub, add this block and replace commit with the commit you want.
21
+ ```starlark
22
+ git_override(
23
+ module_name = "toolchains_llvm",
24
+ commit = "{commit}",
25
+ remote = "https://github.com/bazel-contrib/toolchains_llvm",
26
+ )
27
+ ```
28
+
28
29
If not using `bzlmod`, include this section in your `WORKSPACE`:
29
30
30
31
```starlark
Original file line number Diff line number Diff line change @@ -16,7 +16,9 @@ sed -i.bak "s/0.0.0/${tag}/" MODULE.bazel && git add MODULE.bazel && git commit
16
16
git archive --format=tar --prefix=" ${prefix} /" HEAD | gzip > " ${archive} "
17
17
sha=$( shasum -a 256 " ${archive} " | cut -f1 -d' ' )
18
18
19
+ # Strip leading "v" from the tag if present to create the semver version.
19
20
sed \
21
+ -e " s/{version}/${tag# v} /g" \
20
22
-e " s/{tag}/${tag} /g" \
21
23
-e " s/{commit}/${commit} /g" \
22
24
-e " s/{prefix}/${prefix} /g" \
You can’t perform that action at this time.
0 commit comments