Automatic code cleanup.

PiperOrigin-RevId: 456494185
Change-Id: I9aaefff0976cca2b68646970c8d4675c8e122d19
This commit is contained in:
Googler 2022-06-22 06:02:01 -07:00 committed by Copybara-Service
parent 8bb0eb5c5c
commit 2f8c04c044
4 changed files with 8 additions and 8 deletions

View File

@ -13,7 +13,7 @@
# limitations under the License.
"""Rule that provides the CC_FLAGS Make variable."""
load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain")
load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain", "use_cpp_toolchain")
load("//cc:action_names.bzl", "CC_FLAGS_MAKE_VARIABLE_ACTION_NAME")
load("//cc/private/rules_impl:cc_flags_supplier_lib.bzl", "build_cc_flags")
@ -30,6 +30,6 @@ cc_flags_supplier = rule(
attrs = {
"_cc_toolchain": attr.label(default = Label("@bazel_tools//tools/cpp:current_cc_toolchain")),
},
toolchains = ["@bazel_tools//tools/cpp:toolchain_type"], # copybara-use-repo-external-label
toolchains = use_cpp_toolchain(), # copybara-use-repo-external-label
fragments = ["cpp"],
)

View File

@ -14,7 +14,7 @@
"""Example showing how to create a rule that rules_cc can depend on."""
load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain")
load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain", "use_cpp_toolchain")
load("@rules_cc//cc:action_names.bzl", "CPP_LINK_STATIC_LIBRARY_ACTION_NAME")
load("//examples/my_c_compile:my_c_compile.bzl", "MyCCompileInfo")
@ -95,5 +95,5 @@ my_c_archive = rule(
"_cc_toolchain": attr.label(default = Label("@bazel_tools//tools/cpp:current_cc_toolchain")),
},
fragments = ["cpp"],
toolchains = ["@bazel_tools//tools/cpp:toolchain_type"], # copybara-use-repo-external-label
toolchains = use_cpp_toolchain(), # copybara-use-repo-external-label
)

View File

@ -14,7 +14,7 @@
"""Example showing how to create a rule that just compiles C sources."""
load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain")
load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain", "use_cpp_toolchain")
load("@rules_cc//cc:action_names.bzl", "C_COMPILE_ACTION_NAME")
MyCCompileInfo = provider(doc = "", fields = ["object"])
@ -76,6 +76,6 @@ my_c_compile = rule(
"src": attr.label(mandatory = True, allow_single_file = True),
"_cc_toolchain": attr.label(default = Label("@bazel_tools//tools/cpp:current_cc_toolchain")),
},
toolchains = ["@bazel_tools//tools/cpp:toolchain_type"], # copybara-use-repo-external-label
toolchains = use_cpp_toolchain(), # copybara-use-repo-external-label
fragments = ["cpp"],
)

View File

@ -14,7 +14,7 @@
"""Example showing how to get CcToolchainInfo in a custom rule."""
load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain")
load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain", "use_cpp_toolchain")
def _write_cc_toolchain_cpu_impl(ctx):
cc_toolchain = find_cpp_toolchain(ctx)
@ -28,5 +28,5 @@ write_cc_toolchain_cpu = rule(
attrs = {
"_cc_toolchain": attr.label(default = Label("@bazel_tools//tools/cpp:current_cc_toolchain")),
},
toolchains = ["@bazel_tools//tools/cpp:toolchain_type"], # copybara-use-repo-external-label
toolchains = use_cpp_toolchain(), # copybara-use-repo-external-label
)