2
0
Fork 0
mirror of https://github.com/bazelbuild/rules_cc synced 2024-11-27 20:43:26 +00:00

Rename additional_files to data.

BEGIN_PUBLIC
Rename additional_files to data.

This is more consistent with other rules.
END_PUBLIC

PiperOrigin-RevId: 615364332
Change-Id: Ic27ec8c8e72d290e72074034f85a34b38401599b
This commit is contained in:
Googler 2024-03-13 04:22:04 -07:00 committed by Copybara-Service
parent e658433e23
commit 59cf8ff109
7 changed files with 23 additions and 23 deletions

View file

@ -40,7 +40,7 @@ def _cc_action_type_config_impl(ctx):
tools = tuple(collect_tools(ctx, ctx.attr.tools))
implies = collect_features(ctx.attr.implies)
args_list = collect_args_lists(ctx.attr.args, ctx.label)
files = collect_files(ctx.attr.additional_files)
files = collect_files(ctx.attr.data)
configs = {}
for action_type in collect_action_types(ctx.attr.action_types).to_list():
@ -92,7 +92,7 @@ unconditionally bound to the specified actions.
providers = [FeatureSetInfo],
doc = "Features that should be enabled when this action is used.",
),
"additional_files": attr.label_list(
"data": attr.label_list(
allow_files = True,
doc = """Files required for this action type.

View file

@ -38,7 +38,7 @@ def _cc_args_impl(ctx):
)]
actions = collect_action_types(ctx.attr.actions)
files = collect_files(ctx.attr.additional_files)
files = collect_files(ctx.attr.data)
requires = collect_provider(ctx.attr.requires_any_of, FeatureConstraintInfo)
args = ArgsInfo(
@ -71,14 +71,6 @@ cc_args = rule(
doc = """A list of action types that this flag set applies to.
See @rules_cc//cc/toolchains/actions:all for valid options.
""",
),
"additional_files": attr.label_list(
allow_files = True,
doc = """Files required to add this argument to the command-line.
For example, a flag that sets the header directory might add the headers in that
directory as additional files.
""",
),
"args": attr.string_list(
@ -88,6 +80,14 @@ directory as additional files.
These are evaluated in order, with earlier args appearing earlier in the
invocation of the underlying tool.
""",
),
"data": attr.label_list(
allow_files = True,
doc = """Files required to add this argument to the command-line.
For example, a flag that sets the header directory might add the headers in that
directory as additional files.
""",
),
"env": attr.string_dict(
doc = "Environment variables to be added to the command-line.",

View file

@ -7,10 +7,10 @@ util.helper_target(
cc_action_type_config,
name = "file_map",
action_types = ["//tests/rule_based_toolchain/actions:all_compile"],
additional_files = [
args = ["//tests/rule_based_toolchain/args_list"],
data = [
"//tests/rule_based_toolchain/testdata:multiple2",
],
args = ["//tests/rule_based_toolchain/args_list"],
tools = [
"//tests/rule_based_toolchain/testdata:bin_wrapper.sh",
"//tests/rule_based_toolchain/tool:wrapped_tool",

View file

@ -7,14 +7,14 @@ util.helper_target(
cc_args,
name = "simple",
actions = ["//tests/rule_based_toolchain/actions:all_compile"],
additional_files = [
"//tests/rule_based_toolchain/testdata:file1",
"//tests/rule_based_toolchain/testdata:multiple",
],
args = [
"--foo",
"foo",
],
data = [
"//tests/rule_based_toolchain/testdata:file1",
"//tests/rule_based_toolchain/testdata:multiple",
],
env = {"BAR": "bar"},
)

View file

@ -8,8 +8,8 @@ util.helper_target(
cc_args,
name = "c_compile_args",
actions = ["//tests/rule_based_toolchain/actions:c_compile"],
additional_files = ["//tests/rule_based_toolchain/testdata:file1"],
args = ["c"],
data = ["//tests/rule_based_toolchain/testdata:file1"],
visibility = ["//tests/rule_based_toolchain:__subpackages__"],
)
@ -17,8 +17,8 @@ util.helper_target(
cc_args,
name = "cpp_compile_args",
actions = ["//tests/rule_based_toolchain/actions:cpp_compile"],
additional_files = ["//tests/rule_based_toolchain/testdata:file2"],
args = ["cpp"],
data = ["//tests/rule_based_toolchain/testdata:file2"],
visibility = ["//tests/rule_based_toolchain:__subpackages__"],
)
@ -26,8 +26,8 @@ util.helper_target(
cc_args,
name = "all_compile_args",
actions = ["//tests/rule_based_toolchain/actions:all_compile"],
additional_files = ["//tests/rule_based_toolchain/testdata:multiple1"],
args = ["all"],
data = ["//tests/rule_based_toolchain/testdata:multiple1"],
visibility = ["//tests/rule_based_toolchain:__subpackages__"],
)

View file

@ -11,8 +11,8 @@ util.helper_target(
cc_args,
name = "c_compile",
actions = ["//tests/rule_based_toolchain/actions:c_compile"],
additional_files = ["//tests/rule_based_toolchain/testdata:file1"],
args = ["c"],
data = ["//tests/rule_based_toolchain/testdata:file1"],
)
util.helper_target(

View file

@ -29,8 +29,8 @@ util.helper_target(
cc_args,
name = "c_compile_args",
actions = ["//tests/rule_based_toolchain/actions:c_compile"],
additional_files = ["//tests/rule_based_toolchain/testdata:file1"],
args = ["c_compile_args"],
data = ["//tests/rule_based_toolchain/testdata:file1"],
)
util.helper_target(
@ -73,8 +73,8 @@ util.helper_target(
cc_args,
name = "compile_args",
actions = ["//tests/rule_based_toolchain/actions:all_compile"],
additional_files = ["//tests/rule_based_toolchain/testdata:file2"],
args = ["compile_args"],
data = ["//tests/rule_based_toolchain/testdata:file2"],
)
util.helper_target(