From e2974d75b1420a5a949969c7ab170cb6040b937c Mon Sep 17 00:00:00 2001 From: jheaff1 Date: Tue, 19 Jul 2022 14:59:50 +0100 Subject: [PATCH] fix: Add tool runfiles to action Previously, tool runfiles were not present at execution time. For example, if the provided tool was a py_binary, the py_binary would fail to run due to the omission of the runfiles. This relates to bazelbuild/bazel#10110 --- foreign_cc/private/framework.bzl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/foreign_cc/private/framework.bzl b/foreign_cc/private/framework.bzl index 88bf2a950..514e71e3d 100644 --- a/foreign_cc/private/framework.bzl +++ b/foreign_cc/private/framework.bzl @@ -473,7 +473,8 @@ def cc_external_rule_impl(ctx, attrs): ctx.files.build_data + legacy_tools + [cc_toolchain.all_files] + - [data[DefaultInfo].default_runfiles.files for data in data_dependencies], + [data[DefaultInfo].default_runfiles.files for data in data_dependencies] + + [data[DefaultInfo].files_to_run for data in data_dependencies], command = wrapped_outputs.wrapper_script_file.path, execution_requirements = execution_requirements, use_default_shell_env = True,