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
diff --git a/cc/toolchains/action_type_config.bzl b/cc/toolchains/action_type_config.bzl
index fbdc537..4d5a8cd 100644
--- a/cc/toolchains/action_type_config.bzl
+++ b/cc/toolchains/action_type_config.bzl
@@ -40,7 +40,7 @@
     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 @@
             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.
 
diff --git a/cc/toolchains/args.bzl b/cc/toolchains/args.bzl
index b2f3660..3bedfa8 100644
--- a/cc/toolchains/args.bzl
+++ b/cc/toolchains/args.bzl
@@ -38,7 +38,7 @@
     )]
 
     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(
@@ -73,14 +73,6 @@
 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(
             mandatory = True,
             doc = """Arguments that should be added to the command-line.
@@ -89,6 +81,14 @@
 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.",
         ),
diff --git a/tests/rule_based_toolchain/action_type_config/BUILD b/tests/rule_based_toolchain/action_type_config/BUILD
index b2fe529..e7b9194 100644
--- a/tests/rule_based_toolchain/action_type_config/BUILD
+++ b/tests/rule_based_toolchain/action_type_config/BUILD
@@ -7,10 +7,10 @@
     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",
diff --git a/tests/rule_based_toolchain/args/BUILD b/tests/rule_based_toolchain/args/BUILD
index 6806aff..b6003a1 100644
--- a/tests/rule_based_toolchain/args/BUILD
+++ b/tests/rule_based_toolchain/args/BUILD
@@ -7,14 +7,14 @@
     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"},
 )
 
diff --git a/tests/rule_based_toolchain/args_list/BUILD b/tests/rule_based_toolchain/args_list/BUILD
index fe62d06..9fc9f88 100644
--- a/tests/rule_based_toolchain/args_list/BUILD
+++ b/tests/rule_based_toolchain/args_list/BUILD
@@ -8,8 +8,8 @@
     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 @@
     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 @@
     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__"],
 )
 
diff --git a/tests/rule_based_toolchain/features/BUILD b/tests/rule_based_toolchain/features/BUILD
index c7ea334..95f67aa 100644
--- a/tests/rule_based_toolchain/features/BUILD
+++ b/tests/rule_based_toolchain/features/BUILD
@@ -11,8 +11,8 @@
     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(
diff --git a/tests/rule_based_toolchain/toolchain_config/BUILD b/tests/rule_based_toolchain/toolchain_config/BUILD
index f2e91f5..fbfdc42 100644
--- a/tests/rule_based_toolchain/toolchain_config/BUILD
+++ b/tests/rule_based_toolchain/toolchain_config/BUILD
@@ -29,8 +29,8 @@
     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 @@
     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(