Skip to content

Commit 4f3f398

Browse files
authored
Update to Bazel 8 and use bzl_mod (#28)
Update the repo to `Bazel 8`, use latest version of `rules_swiftnav` using `git_override` and enable `bzl_mod`.
1 parent 35f9c4c commit 4f3f398

File tree

8 files changed

+967
-57
lines changed

8 files changed

+967
-57
lines changed

.bazeliskrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
USE_BAZEL_VERSION=6.2.0
1+
USE_BAZEL_VERSION=8.3.1

.bazelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ build:aarch64_sysroot --incompatible_enable_cc_toolchain_resolution
22
build:aarch64_sysroot --platforms=@rules_swiftnav//platforms:aarch64_bullseye_graviton2
33

44
build:x86_64_sysroot --incompatible_enable_cc_toolchain_resolution
5-
build:x86_64_sysroot --@rules_swiftnav//cc:enable_sysroot=true
5+
build:x86_64_sysroot --@rules_swiftnav//cc:use_libcpp=true
66

77
try-import %workspace%/.bazelrc.user

.github/workflows/bullseye-aarch64-sysroot.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
paths:
66
- "sysroot/**"
77
- .github/workflows/bullseye-aarch64-sysroot.yaml
8+
- "MODULE.bazel"
9+
- ".bazeliskrc"
10+
- ".bazelrc"
811
push:
912
tags:
1013
- "bullseye-sysroot-*"

.github/workflows/bullseye-x86_64-sysroot.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
paths:
66
- "sysroot/**"
77
- .github/workflows/bullseye-x86_64-sysroot.yaml
8+
- "MODULE.bazel"
9+
- ".bazeliskrc"
10+
- ".bazelrc"
811
push:
912
tags:
1013
- "bullseye-sysroot-*"

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ llvm-obfuscator-*.txz
66
sysroot/out
77
/bazel-*
88
.bazelrc.user
9+
10+
debian_bullseye_x86_64_sysroot.tar.xz
11+
debian_bullseye_aarch64_sysroot.tar.xz

MODULE.bazel

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
bazel_dep(name = "bazel_skylib", version = "1.8.2")
2+
3+
bazel_dep(name = "rules_swiftnav", version = "0.10.0")
4+
git_override(
5+
module_name = "rules_swiftnav",
6+
remote = "https://github.com/swift-nav/rules_swiftnav.git",
7+
commit = "3d7491c82b032802774570beb169633d15643846",
8+
)
9+
10+
swift_cc_toolchain_ext = use_extension("@rules_swiftnav//cc:extensions.bzl", "swift_cc_toolchain_extension")
11+
use_repo(
12+
swift_cc_toolchain_ext,
13+
"aarch64-darwin-llvm",
14+
"aarch64-linux-llvm",
15+
"x86_64-darwin-llvm",
16+
"x86_64-linux-llvm",
17+
)
18+
19+
register_toolchains(
20+
"@rules_swiftnav//cc/toolchains/llvm/aarch64-darwin:cc-toolchain-aarch64-darwin",
21+
"@rules_swiftnav//cc/toolchains/llvm/x86_64-darwin:cc-toolchain-x86_64-darwin",
22+
"@rules_swiftnav//cc/toolchains/llvm/aarch64-linux:cc-toolchain-aarch64-linux",
23+
"@rules_swiftnav//cc/toolchains/llvm/x86_64-linux:cc-toolchain-x86_64-linux",
24+
"@rules_swiftnav//cc/toolchains/llvm/x86_64-linux:cc-toolchain-intel-mkl",
25+
"@rules_swiftnav//cc/toolchains/llvm/x86_64-aarch64-linux:cc-toolchain-aarch64-bullseye-graviton2",
26+
"@rules_swiftnav//cc/toolchains/llvm/x86_64-aarch64-linux:cc-toolchain-aarch64-bullseye-graviton3",
27+
)

MODULE.bazel.lock

Lines changed: 929 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

WORKSPACE.bazel

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)