Skip to content

Commit

Permalink
Automatic code cleanup.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 456494185
Change-Id: I9aaefff0976cca2b68646970c8d4675c8e122d19
  • Loading branch information
katre authored and copybara-github committed Jun 22, 2022
1 parent 8bb0eb5 commit 2f8c04c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions cc/private/rules_impl/cc_flags_supplier.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -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"],
)
4 changes: 2 additions & 2 deletions examples/my_c_archive/my_c_archive.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down Expand Up @@ -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
)
4 changes: 2 additions & 2 deletions examples/my_c_compile/my_c_compile.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand Down Expand Up @@ -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"],
)
4 changes: 2 additions & 2 deletions examples/write_cc_toolchain_cpu/write_cc_toolchain_cpu.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
)

0 comments on commit 2f8c04c

Please sign in to comment.