From 2b632943202588219f07f2bdfa7f8ba496ba6bbc Mon Sep 17 00:00:00 2001 From: Ralf Anton Beier Date: Thu, 13 Nov 2025 06:38:36 +0100 Subject: [PATCH] Add missing rustc binaries to rustc_lib filegroup Adds `rust-objcopy` and `wasm-component-ld` to the rustc_lib filegroup in repository_utils.bzl. These binaries are present in recent rustc distributions (wasm-component-ld since 1.82.0, rust-objcopy since 1.84.0) but were not declared in the filegroup. On Windows, Bazel copies files into the sandbox rather than symlinking, so only explicitly listed files are available. This caused wasm32-wasip2 builds to fail with "linker 'wasm-component-ld.exe' not found". On Linux/macOS, the issue was masked by symlink-based sandboxing which allowed access to unlisted files in the same directory. --- rust/private/repository_utils.bzl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rust/private/repository_utils.bzl b/rust/private/repository_utils.bzl index 05b741947d..43995e048b 100644 --- a/rust/private/repository_utils.bzl +++ b/rust/private/repository_utils.bzl @@ -57,6 +57,8 @@ filegroup( "bin/*{dylib_ext}", "lib/*{dylib_ext}*", "lib/rustlib/{target_triple}/codegen-backends/*{dylib_ext}", + "lib/rustlib/{target_triple}/bin/rust-objcopy{binary_ext}", + "lib/rustlib/{target_triple}/bin/wasm-component-ld{binary_ext}", "lib/rustlib/{target_triple}/lib/*{dylib_ext}*", "lib/rustlib/{target_triple}/lib/*.rmeta", ],