diff --git a/.bazelversion b/.bazelversion index 815da58b7..ae9a76b92 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -7.4.1 +8.0.0 diff --git a/MODULE.bazel b/MODULE.bazel index bcb74f7f9..823756225 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -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") diff --git a/local-remote-execution/overlays/lre-rs.nix b/local-remote-execution/overlays/lre-rs.nix index 0fe1d3ce3..c0db11fac 100644 --- a/local-remote-execution/overlays/lre-rs.nix +++ b/local-remote-execution/overlays/lre-rs.nix @@ -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: @@ -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); diff --git a/local-remote-execution/rust/aarch64-darwin.BUILD.bazel b/local-remote-execution/rust/aarch64-darwin.BUILD.bazel index 1564b9d1d..ac97014eb 100644 --- a/local-remote-execution/rust/aarch64-darwin.BUILD.bazel +++ b/local-remote-execution/rust/aarch64-darwin.BUILD.bazel @@ -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"], ) @@ -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"], ) diff --git a/local-remote-execution/rust/aarch64-linux.BUILD.bazel b/local-remote-execution/rust/aarch64-linux.BUILD.bazel index 10a1945b4..54f9171d7 100644 --- a/local-remote-execution/rust/aarch64-linux.BUILD.bazel +++ b/local-remote-execution/rust/aarch64-linux.BUILD.bazel @@ -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"], ) @@ -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"], ) diff --git a/local-remote-execution/rust/x86_64-darwin.BUILD.bazel b/local-remote-execution/rust/x86_64-darwin.BUILD.bazel index b65011808..fcff515c0 100644 --- a/local-remote-execution/rust/x86_64-darwin.BUILD.bazel +++ b/local-remote-execution/rust/x86_64-darwin.BUILD.bazel @@ -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"], ) @@ -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"], ) diff --git a/local-remote-execution/rust/x86_64-linux.BUILD.bazel b/local-remote-execution/rust/x86_64-linux.BUILD.bazel index 93d68dfe9..9fdc08f2f 100644 --- a/local-remote-execution/rust/x86_64-linux.BUILD.bazel +++ b/local-remote-execution/rust/x86_64-linux.BUILD.bazel @@ -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"], ) @@ -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"], ) diff --git a/nativelink-proto/BUILD.bazel b/nativelink-proto/BUILD.bazel index d8ab175d0..489c30f4b 100644 --- a/nativelink-proto/BUILD.bazel +++ b/nativelink-proto/BUILD.bazel @@ -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) @@ -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 }),