Skip to content

Commit

Permalink
refactor: Provide tools as list rather than depset
Browse files Browse the repository at this point in the history
This allows the inclusion of FilesToRunProvider instances as well as
File instances. In an upcoming commit, the FilesToRunProviders of tools
will be added to this list, to fix the issue of tool runfiles not
present at execution time.
  • Loading branch information
jheaff1 committed Jul 19, 2022
1 parent 0dafcb2 commit 2e88701
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions foreign_cc/private/framework.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -467,10 +467,13 @@ def cc_external_rule_impl(ctx, attrs):
mnemonic = "Cc" + attrs.configure_name.capitalize() + "MakeRule",
inputs = depset(inputs.declared_inputs),
outputs = rule_outputs + [wrapped_outputs.log_file],
tools = depset(
[wrapped_outputs.script_file, wrapped_outputs.wrapper_script_file] + ctx.files.data + ctx.files.build_data + legacy_tools,
transitive = [cc_toolchain.all_files] + [data[DefaultInfo].default_runfiles.files for data in data_dependencies],
),
tools =
[wrapped_outputs.script_file, wrapped_outputs.wrapper_script_file] +
ctx.files.data +
ctx.files.build_data +
legacy_tools +
[cc_toolchain.all_files] +
[data[DefaultInfo].default_runfiles.files for data in data_dependencies],
command = wrapped_outputs.wrapper_script_file.path,
execution_requirements = execution_requirements,
use_default_shell_env = True,
Expand Down

0 comments on commit 2e88701

Please sign in to comment.