File tree Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Expand file tree Collapse file tree 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**
33If you're using `bzlmod`, add the following to `MODULE.bazel`:
44
55```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}")
157
168# Configure and register the toolchain.
179llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm")
@@ -25,6 +17,15 @@ use_repo(llvm, "llvm_toolchain")
2517register_toolchains("@llvm_toolchain//:all")
2618```
2719
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+
2829If not using `bzlmod`, include this section in your `WORKSPACE`:
2930
3031```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
1616git archive --format=tar --prefix=" ${prefix} /" HEAD | gzip > " ${archive} "
1717sha=$( shasum -a 256 " ${archive} " | cut -f1 -d' ' )
1818
19+ # Strip leading "v" from the tag if present to create the semver version.
1920sed \
21+ -e " s/{version}/${tag# v} /g" \
2022 -e " s/{tag}/${tag} /g" \
2123 -e " s/{commit}/${commit} /g" \
2224 -e " s/{prefix}/${prefix} /g" \
You can’t perform that action at this time.
0 commit comments