Skip to content

Commit fe1ca36

Browse files
Motiejus JakštysBuildkite Bot
Motiejus Jakštys
authored and
Buildkite Bot
committed
chore: finish migration to bzlmod
- bump bazel to 6.4.0 - bump rules_go, gazelle, platforms - enable bzlmod - clear WORKSPACE (cannot remove yet due to examples) - remove `gofmt`, #136 - remove Go MacOS x86_64 tests, #10
1 parent d880f48 commit fe1ca36

File tree

13 files changed

+2102
-719
lines changed

13 files changed

+2102
-719
lines changed

.bazelrc

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
common --enable_bzlmod
2+
13
test --sandbox_default_allow_network=false
24
test --test_output=errors
35

@@ -7,4 +9,4 @@ build --worker_sandboxing
79
build --experimental_reuse_sandbox_directories
810
build --incompatible_enable_cc_toolchain_resolution
911
build --action_env BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
10-
build --experimental_output_directory_naming_scheme=diff_against_baseline
12+
build --experimental_output_directory_naming_scheme=diff_against_dynamic_baseline

.bazelversion

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.3.0
1+
6.4.0

BUILD

-5
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,3 @@ alias(
99
name = "gazelle",
1010
actual = "//tools/gazelle:gazelle",
1111
)
12-
13-
alias(
14-
name = "gazelle-update-repos",
15-
actual = "//tools/gazelle:gazelle-update-repos",
16-
)

MODULE.bazel

+26-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ module(
22
name = "hermetic_cc_toolchain",
33
)
44

5-
bazel_dep(name = "platforms", version = "0.0.6")
5+
bazel_dep(name = "platforms", version = "0.0.8")
66

7-
bazel_dep(name = "rules_go", version = "0.41.0", dev_dependency = True)
7+
bazel_dep(name = "rules_go", version = "0.43.0", dev_dependency = True)
88

99
go_sdk = use_extension(
1010
"@rules_go//go:extensions.bzl",
@@ -13,7 +13,7 @@ go_sdk = use_extension(
1313
)
1414
use_repo(go_sdk, "go_default_sdk")
1515

16-
bazel_dep(name = "gazelle", version = "0.32.0", dev_dependency = True)
16+
bazel_dep(name = "gazelle", version = "0.34.0", dev_dependency = True)
1717

1818
go_deps = use_extension(
1919
"@gazelle//:extensions.bzl",
@@ -24,4 +24,27 @@ go_deps.from_file(go_mod = "//:go.mod")
2424
use_repo(
2525
go_deps,
2626
"com_github_bazelbuild_buildtools",
27+
"com_github_stretchr_testify",
28+
)
29+
30+
toolchains = use_extension("//toolchain:ext.bzl", "toolchains")
31+
use_repo(toolchains, "zig_sdk")
32+
33+
register_toolchains(
34+
# if no `--platform` is specified, these toolchains will be used for
35+
# (linux,darwin,windows)x(amd64,arm64)
36+
"@zig_sdk//toolchain:linux_amd64_gnu.2.28",
37+
"@zig_sdk//toolchain:linux_arm64_gnu.2.28",
38+
"@zig_sdk//toolchain:darwin_amd64",
39+
"@zig_sdk//toolchain:darwin_arm64",
40+
"@zig_sdk//toolchain:windows_amd64",
41+
"@zig_sdk//toolchain:windows_arm64",
42+
43+
# amd64 toolchains for libc-aware platforms:
44+
"@zig_sdk//libc_aware/toolchain:linux_amd64_gnu.2.28",
45+
"@zig_sdk//libc_aware/toolchain:linux_amd64_gnu.2.31",
46+
"@zig_sdk//libc_aware/toolchain:linux_amd64_musl",
47+
# arm64 toolchains for libc-aware platforms:
48+
"@zig_sdk//libc_aware/toolchain:linux_arm64_gnu.2.28",
49+
"@zig_sdk//libc_aware/toolchain:linux_arm64_musl",
2750
)

0 commit comments

Comments
 (0)