File size: 871 Bytes
aada7ee
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/cargo/private/cargo_build_script.bzl b/cargo/private/cargo_build_script.bzl
--- a/cargo/private/cargo_build_script.bzl
+++ b/cargo/private/cargo_build_script.bzl
@@ -396,3 +396,8 @@ def _cargo_build_script_impl(ctx):
+    script_tools = []
+    for target in ctx.attr.tools:
+        script_tools.append(target[DefaultInfo].files)
+        script_tools.append(target[DefaultInfo].default_runfiles.files)
+
     workspace_name = ctx.label.workspace_name
     if not workspace_name:
         workspace_name = ctx.workspace_name
@@ -581,5 +586,5 @@ def _cargo_build_script_impl(ctx):
         direct = [
             ctx.executable._cargo_build_script_runner,
         ] + ([toolchain.target_json] if toolchain.target_json else []),
-        transitive = script_data + toolchain_tools,
+        transitive = script_data + script_tools + toolchain_tools,
     )