Skip to content

Commit

Permalink
Bump to Bazel 8
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronmondal committed Dec 15, 2024
1 parent f672af7 commit 09bc24c
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 45 deletions.
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.4.1
8.0.0
1 change: 1 addition & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module(

bazel_dep(name = "rules_cc", version = "0.0.17")
bazel_dep(name = "platforms", version = "0.0.10")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "rules_python", version = "1.0.0")

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
Expand Down
4 changes: 2 additions & 2 deletions local-remote-execution/overlays/lre-rs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
${" "} "lib/rustlib/${target}/codegen-backends/*.so",
${" "} "lib/rustlib/${target}/bin/rust-lld",
${" "} "lib/rustlib/${target}/lib/*.so",
${" "} ]),'';
${" "} ], allow_empty = True),'';

# Generate stdlib select entry for a target
mkStdlibSelectEntry = target:
Expand All @@ -69,7 +69,7 @@
${" "} "lib/rustlib/${target}/lib/*.a",''
+ (lib.optionalString (builtins.match ".*-musl" target != null)
''${"\n "} "lib/rustlib/${target}/lib/self-contained/**",'')
+ ''${"\n "} ]),'';
+ ''${"\n "} ], allow_empty = True),'';

selectEntries = builtins.concatStringsSep "\n" (map mkSelectEntry rustTargets);
stdlibSelectEntries = builtins.concatStringsSep "\n" (map mkStdlibSelectEntry rustTargets);
Expand Down
24 changes: 12 additions & 12 deletions local-remote-execution/rust/aarch64-darwin.BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -45,42 +45,42 @@ filegroup(
"lib/rustlib/aarch64-apple-darwin/codegen-backends/*.so",
"lib/rustlib/aarch64-apple-darwin/bin/rust-lld",
"lib/rustlib/aarch64-apple-darwin/lib/*.so",
]),
], allow_empty = True),
"@local-remote-execution//rust/triple:aarch64-unknown-linux-gnu": glob([
"bin/*.so",
"lib/*.so",
"lib/rustlib/aarch64-unknown-linux-gnu/codegen-backends/*.so",
"lib/rustlib/aarch64-unknown-linux-gnu/bin/rust-lld",
"lib/rustlib/aarch64-unknown-linux-gnu/lib/*.so",
]),
], allow_empty = True),
"@local-remote-execution//rust/triple:aarch64-unknown-linux-musl": glob([
"bin/*.so",
"lib/*.so",
"lib/rustlib/aarch64-unknown-linux-musl/codegen-backends/*.so",
"lib/rustlib/aarch64-unknown-linux-musl/bin/rust-lld",
"lib/rustlib/aarch64-unknown-linux-musl/lib/*.so",
]),
], allow_empty = True),
"@local-remote-execution//rust/triple:x86_64-apple-darwin": glob([
"bin/*.so",
"lib/*.so",
"lib/rustlib/x86_64-apple-darwin/codegen-backends/*.so",
"lib/rustlib/x86_64-apple-darwin/bin/rust-lld",
"lib/rustlib/x86_64-apple-darwin/lib/*.so",
]),
], allow_empty = True),
"@local-remote-execution//rust/triple:x86_64-unknown-linux-gnu": glob([
"bin/*.so",
"lib/*.so",
"lib/rustlib/x86_64-unknown-linux-gnu/codegen-backends/*.so",
"lib/rustlib/x86_64-unknown-linux-gnu/bin/rust-lld",
"lib/rustlib/x86_64-unknown-linux-gnu/lib/*.so",
]),
], allow_empty = True),
"@local-remote-execution//rust/triple:x86_64-unknown-linux-musl": glob([
"bin/*.so",
"lib/*.so",
"lib/rustlib/x86_64-unknown-linux-musl/codegen-backends/*.so",
"lib/rustlib/x86_64-unknown-linux-musl/bin/rust-lld",
"lib/rustlib/x86_64-unknown-linux-musl/lib/*.so",
]),
], allow_empty = True),
}),
visibility = ["//visibility:public"],
)
Expand All @@ -92,34 +92,34 @@ rust_stdlib_filegroup(
"lib/rustlib/aarch64-apple-darwin/lib/*.rlib",
"lib/rustlib/aarch64-apple-darwin/lib/*.so",
"lib/rustlib/aarch64-apple-darwin/lib/*.a",
]),
], allow_empty = True),
"@local-remote-execution//rust/triple:aarch64-unknown-linux-gnu": glob([
"lib/rustlib/aarch64-unknown-linux-gnu/lib/*.rlib",
"lib/rustlib/aarch64-unknown-linux-gnu/lib/*.so",
"lib/rustlib/aarch64-unknown-linux-gnu/lib/*.a",
]),
], allow_empty = True),
"@local-remote-execution//rust/triple:aarch64-unknown-linux-musl": glob([
"lib/rustlib/aarch64-unknown-linux-musl/lib/*.rlib",
"lib/rustlib/aarch64-unknown-linux-musl/lib/*.so",
"lib/rustlib/aarch64-unknown-linux-musl/lib/*.a",
"lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/**",
]),
], allow_empty = True),
"@local-remote-execution//rust/triple:x86_64-apple-darwin": glob([
"lib/rustlib/x86_64-apple-darwin/lib/*.rlib",
"lib/rustlib/x86_64-apple-darwin/lib/*.so",
"lib/rustlib/x86_64-apple-darwin/lib/*.a",
]),
], allow_empty = True),
"@local-remote-execution//rust/triple:x86_64-unknown-linux-gnu": glob([
"lib/rustlib/x86_64-unknown-linux-gnu/lib/*.rlib",
"lib/rustlib/x86_64-unknown-linux-gnu/lib/*.so",
"lib/rustlib/x86_64-unknown-linux-gnu/lib/*.a",
]),
], allow_empty = True),
"@local-remote-execution//rust/triple:x86_64-unknown-linux-musl": glob([
"lib/rustlib/x86_64-unknown-linux-musl/lib/*.rlib",
"lib/rustlib/x86_64-unknown-linux-musl/lib/*.so",
"lib/rustlib/x86_64-unknown-linux-musl/lib/*.a",
"lib/rustlib/x86_64-unknown-linux-musl/lib/self-contained/**",
]),
], allow_empty = True),
}),
visibility = ["//visibility:public"],
)
16 changes: 8 additions & 8 deletions local-remote-execution/rust/aarch64-linux.BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -45,28 +45,28 @@ filegroup(
"lib/rustlib/aarch64-unknown-linux-gnu/codegen-backends/*.so",
"lib/rustlib/aarch64-unknown-linux-gnu/bin/rust-lld",
"lib/rustlib/aarch64-unknown-linux-gnu/lib/*.so",
]),
], allow_empty = True),
"@local-remote-execution//rust/triple:aarch64-unknown-linux-musl": glob([
"bin/*.so",
"lib/*.so",
"lib/rustlib/aarch64-unknown-linux-musl/codegen-backends/*.so",
"lib/rustlib/aarch64-unknown-linux-musl/bin/rust-lld",
"lib/rustlib/aarch64-unknown-linux-musl/lib/*.so",
]),
], allow_empty = True),
"@local-remote-execution//rust/triple:x86_64-unknown-linux-gnu": glob([
"bin/*.so",
"lib/*.so",
"lib/rustlib/x86_64-unknown-linux-gnu/codegen-backends/*.so",
"lib/rustlib/x86_64-unknown-linux-gnu/bin/rust-lld",
"lib/rustlib/x86_64-unknown-linux-gnu/lib/*.so",
]),
], allow_empty = True),
"@local-remote-execution//rust/triple:x86_64-unknown-linux-musl": glob([
"bin/*.so",
"lib/*.so",
"lib/rustlib/x86_64-unknown-linux-musl/codegen-backends/*.so",
"lib/rustlib/x86_64-unknown-linux-musl/bin/rust-lld",
"lib/rustlib/x86_64-unknown-linux-musl/lib/*.so",
]),
], allow_empty = True),
}),
visibility = ["//visibility:public"],
)
Expand All @@ -78,24 +78,24 @@ rust_stdlib_filegroup(
"lib/rustlib/aarch64-unknown-linux-gnu/lib/*.rlib",
"lib/rustlib/aarch64-unknown-linux-gnu/lib/*.so",
"lib/rustlib/aarch64-unknown-linux-gnu/lib/*.a",
]),
], allow_empty = True),
"@local-remote-execution//rust/triple:aarch64-unknown-linux-musl": glob([
"lib/rustlib/aarch64-unknown-linux-musl/lib/*.rlib",
"lib/rustlib/aarch64-unknown-linux-musl/lib/*.so",
"lib/rustlib/aarch64-unknown-linux-musl/lib/*.a",
"lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/**",
]),
], allow_empty = True),
"@local-remote-execution//rust/triple:x86_64-unknown-linux-gnu": glob([
"lib/rustlib/x86_64-unknown-linux-gnu/lib/*.rlib",
"lib/rustlib/x86_64-unknown-linux-gnu/lib/*.so",
"lib/rustlib/x86_64-unknown-linux-gnu/lib/*.a",
]),
], allow_empty = True),
"@local-remote-execution//rust/triple:x86_64-unknown-linux-musl": glob([
"lib/rustlib/x86_64-unknown-linux-musl/lib/*.rlib",
"lib/rustlib/x86_64-unknown-linux-musl/lib/*.so",
"lib/rustlib/x86_64-unknown-linux-musl/lib/*.a",
"lib/rustlib/x86_64-unknown-linux-musl/lib/self-contained/**",
]),
], allow_empty = True),
}),
visibility = ["//visibility:public"],
)
24 changes: 12 additions & 12 deletions local-remote-execution/rust/x86_64-darwin.BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -45,42 +45,42 @@ filegroup(
"lib/rustlib/aarch64-apple-darwin/codegen-backends/*.so",
"lib/rustlib/aarch64-apple-darwin/bin/rust-lld",
"lib/rustlib/aarch64-apple-darwin/lib/*.so",
]),
], allow_empty = True),
"@local-remote-execution//rust/triple:aarch64-unknown-linux-gnu": glob([
"bin/*.so",
"lib/*.so",
"lib/rustlib/aarch64-unknown-linux-gnu/codegen-backends/*.so",
"lib/rustlib/aarch64-unknown-linux-gnu/bin/rust-lld",
"lib/rustlib/aarch64-unknown-linux-gnu/lib/*.so",
]),
], allow_empty = True),
"@local-remote-execution//rust/triple:aarch64-unknown-linux-musl": glob([
"bin/*.so",
"lib/*.so",
"lib/rustlib/aarch64-unknown-linux-musl/codegen-backends/*.so",
"lib/rustlib/aarch64-unknown-linux-musl/bin/rust-lld",
"lib/rustlib/aarch64-unknown-linux-musl/lib/*.so",
]),
], allow_empty = True),
"@local-remote-execution//rust/triple:x86_64-apple-darwin": glob([
"bin/*.so",
"lib/*.so",
"lib/rustlib/x86_64-apple-darwin/codegen-backends/*.so",
"lib/rustlib/x86_64-apple-darwin/bin/rust-lld",
"lib/rustlib/x86_64-apple-darwin/lib/*.so",
]),
], allow_empty = True),
"@local-remote-execution//rust/triple:x86_64-unknown-linux-gnu": glob([
"bin/*.so",
"lib/*.so",
"lib/rustlib/x86_64-unknown-linux-gnu/codegen-backends/*.so",
"lib/rustlib/x86_64-unknown-linux-gnu/bin/rust-lld",
"lib/rustlib/x86_64-unknown-linux-gnu/lib/*.so",
]),
], allow_empty = True),
"@local-remote-execution//rust/triple:x86_64-unknown-linux-musl": glob([
"bin/*.so",
"lib/*.so",
"lib/rustlib/x86_64-unknown-linux-musl/codegen-backends/*.so",
"lib/rustlib/x86_64-unknown-linux-musl/bin/rust-lld",
"lib/rustlib/x86_64-unknown-linux-musl/lib/*.so",
]),
], allow_empty = True),
}),
visibility = ["//visibility:public"],
)
Expand All @@ -92,34 +92,34 @@ rust_stdlib_filegroup(
"lib/rustlib/aarch64-apple-darwin/lib/*.rlib",
"lib/rustlib/aarch64-apple-darwin/lib/*.so",
"lib/rustlib/aarch64-apple-darwin/lib/*.a",
]),
], allow_empty = True),
"@local-remote-execution//rust/triple:aarch64-unknown-linux-gnu": glob([
"lib/rustlib/aarch64-unknown-linux-gnu/lib/*.rlib",
"lib/rustlib/aarch64-unknown-linux-gnu/lib/*.so",
"lib/rustlib/aarch64-unknown-linux-gnu/lib/*.a",
]),
], allow_empty = True),
"@local-remote-execution//rust/triple:aarch64-unknown-linux-musl": glob([
"lib/rustlib/aarch64-unknown-linux-musl/lib/*.rlib",
"lib/rustlib/aarch64-unknown-linux-musl/lib/*.so",
"lib/rustlib/aarch64-unknown-linux-musl/lib/*.a",
"lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/**",
]),
], allow_empty = True),
"@local-remote-execution//rust/triple:x86_64-apple-darwin": glob([
"lib/rustlib/x86_64-apple-darwin/lib/*.rlib",
"lib/rustlib/x86_64-apple-darwin/lib/*.so",
"lib/rustlib/x86_64-apple-darwin/lib/*.a",
]),
], allow_empty = True),
"@local-remote-execution//rust/triple:x86_64-unknown-linux-gnu": glob([
"lib/rustlib/x86_64-unknown-linux-gnu/lib/*.rlib",
"lib/rustlib/x86_64-unknown-linux-gnu/lib/*.so",
"lib/rustlib/x86_64-unknown-linux-gnu/lib/*.a",
]),
], allow_empty = True),
"@local-remote-execution//rust/triple:x86_64-unknown-linux-musl": glob([
"lib/rustlib/x86_64-unknown-linux-musl/lib/*.rlib",
"lib/rustlib/x86_64-unknown-linux-musl/lib/*.so",
"lib/rustlib/x86_64-unknown-linux-musl/lib/*.a",
"lib/rustlib/x86_64-unknown-linux-musl/lib/self-contained/**",
]),
], allow_empty = True),
}),
visibility = ["//visibility:public"],
)
16 changes: 8 additions & 8 deletions local-remote-execution/rust/x86_64-linux.BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -45,28 +45,28 @@ filegroup(
"lib/rustlib/aarch64-unknown-linux-gnu/codegen-backends/*.so",
"lib/rustlib/aarch64-unknown-linux-gnu/bin/rust-lld",
"lib/rustlib/aarch64-unknown-linux-gnu/lib/*.so",
]),
], allow_empty = True),
"@local-remote-execution//rust/triple:aarch64-unknown-linux-musl": glob([
"bin/*.so",
"lib/*.so",
"lib/rustlib/aarch64-unknown-linux-musl/codegen-backends/*.so",
"lib/rustlib/aarch64-unknown-linux-musl/bin/rust-lld",
"lib/rustlib/aarch64-unknown-linux-musl/lib/*.so",
]),
], allow_empty = True),
"@local-remote-execution//rust/triple:x86_64-unknown-linux-gnu": glob([
"bin/*.so",
"lib/*.so",
"lib/rustlib/x86_64-unknown-linux-gnu/codegen-backends/*.so",
"lib/rustlib/x86_64-unknown-linux-gnu/bin/rust-lld",
"lib/rustlib/x86_64-unknown-linux-gnu/lib/*.so",
]),
], allow_empty = True),
"@local-remote-execution//rust/triple:x86_64-unknown-linux-musl": glob([
"bin/*.so",
"lib/*.so",
"lib/rustlib/x86_64-unknown-linux-musl/codegen-backends/*.so",
"lib/rustlib/x86_64-unknown-linux-musl/bin/rust-lld",
"lib/rustlib/x86_64-unknown-linux-musl/lib/*.so",
]),
], allow_empty = True),
}),
visibility = ["//visibility:public"],
)
Expand All @@ -78,24 +78,24 @@ rust_stdlib_filegroup(
"lib/rustlib/aarch64-unknown-linux-gnu/lib/*.rlib",
"lib/rustlib/aarch64-unknown-linux-gnu/lib/*.so",
"lib/rustlib/aarch64-unknown-linux-gnu/lib/*.a",
]),
], allow_empty = True),
"@local-remote-execution//rust/triple:aarch64-unknown-linux-musl": glob([
"lib/rustlib/aarch64-unknown-linux-musl/lib/*.rlib",
"lib/rustlib/aarch64-unknown-linux-musl/lib/*.so",
"lib/rustlib/aarch64-unknown-linux-musl/lib/*.a",
"lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/**",
]),
], allow_empty = True),
"@local-remote-execution//rust/triple:x86_64-unknown-linux-gnu": glob([
"lib/rustlib/x86_64-unknown-linux-gnu/lib/*.rlib",
"lib/rustlib/x86_64-unknown-linux-gnu/lib/*.so",
"lib/rustlib/x86_64-unknown-linux-gnu/lib/*.a",
]),
], allow_empty = True),
"@local-remote-execution//rust/triple:x86_64-unknown-linux-musl": glob([
"lib/rustlib/x86_64-unknown-linux-musl/lib/*.rlib",
"lib/rustlib/x86_64-unknown-linux-musl/lib/*.so",
"lib/rustlib/x86_64-unknown-linux-musl/lib/*.a",
"lib/rustlib/x86_64-unknown-linux-musl/lib/self-contained/**",
]),
], allow_empty = True),
}),
visibility = ["//visibility:public"],
)
4 changes: 2 additions & 2 deletions nativelink-proto/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ genrule(
cmd = select({
platform: '''
set -e
export PROTOC=$(execpath @@toolchains_protoc~~protoc~toolchains_protoc_hub.{}//:bin/protoc)
export PROTOC=$(execpath @@toolchains_protoc++protoc+toolchains_protoc_hub.{}//:bin/protoc)
$(execpath :gen_protos_tool) $(SRCS) -o $(RULEDIR)
Expand All @@ -124,7 +124,7 @@ genrule(
":gen_protos_tool",
] + select({
platform: [
"@@toolchains_protoc~~protoc~toolchains_protoc_hub.{}//:bin/protoc".format(platform),
"@@toolchains_protoc++protoc+toolchains_protoc_hub.{}//:bin/protoc".format(platform),
]
for platform in PLATFORM_NAMES
}),
Expand Down

0 comments on commit 09bc24c

Please sign in to comment.