[bazel] Add more load statements for C++ rules (#154207)

Same thing as #149584, but for more elements of cc_rules (e.g.
`CcInfo`), and applying it to some files that were added since then
(build files under mlir/examples).

Command: `buildifier --lint=fix
--warnings=native-cc-binary,native-cc-import,native-cc-library,native-cc-objc-import,native-cc-objc-library,native-cc-shared-library,native-cc-test,native-cc-toolchain,native-cc-toolchain-suite,native-cc-fdo-prefetch-hints,native-cc-fdo-profile,native-cc-memprof-profile,native-cc-propeller-optimize,native-cc-common,native-cc-debug-package-info,native-cc-info,native-cc-shared-library-info,native-cc-shared-library-hint-info`
This commit is contained in:
Jordan Rupprecht 2025-08-18 19:41:49 -05:00 committed by GitHub
parent 523c3a0197
commit fb4450c459
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 10 additions and 5 deletions

View File

@ -6,7 +6,7 @@ load("@bazel_skylib//lib:selects.bzl", "selects")
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
load("@build_bazel_apple_support//rules:apple_genrule.bzl", "apple_genrule")
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_import", "cc_library", "objc_library")
load("@rules_python//python:defs.bzl", "py_binary")
load("//:vars.bzl", "LLVM_VERSION_MAJOR", "LLVM_VERSION_MINOR", "LLVM_VERSION_PATCH", "LLVM_VERSION_SUFFIX", "PACKAGE_VERSION")
load("//lldb/source/Plugins:plugin_config.bzl", "DEFAULT_PLUGINS", "DEFAULT_SCRIPT_PLUGINS", "OBJCPP_COPTS")

View File

@ -2,7 +2,7 @@
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
load("@rules_cc//cc:defs.bzl", "cc_library")
load("@rules_cc//cc:defs.bzl", "cc_library", "objc_library")
load("//mlir:tblgen.bzl", "gentbl_cc_library")
load(":plugin_config.bzl", "DEFAULT_PLUGINS", "DEFAULT_SCRIPT_PLUGINS", "OBJCPP_COPTS")

View File

@ -6,7 +6,7 @@
load("@bazel_skylib//rules:common_settings.bzl", "BuildSettingInfo")
load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
load("@rules_cc//cc:defs.bzl", "cc_binary")
load("@rules_cc//cc:defs.bzl", "CcInfo", "cc_binary")
# Mapping from every tool to the cc_library that implements the tool's entrypoint.
_TOOLS = {

View File

@ -2,7 +2,7 @@
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_shared_library", "cc_test")
load("//mlir:tblgen.bzl", "gentbl_cc_library")
package(

View File

@ -4,7 +4,7 @@
"""Rules and macros for MLIR"""
load("@rules_cc//cc:defs.bzl", "cc_library")
load("@rules_cc//cc:defs.bzl", "CcInfo", "cc_library")
def if_cuda_available(if_true, if_false = []):
return select({

View File

@ -1,5 +1,7 @@
# MLIR transform dialect standalone example.
load("@rules_cc//cc:defs.bzl", "cc_binary")
package(default_visibility = ["//visibility:public"])
cc_binary(

View File

@ -1,6 +1,7 @@
# Description:
# MLIR Tutorial
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
load("//mlir:tblgen.bzl", "gentbl_cc_library", "td_library")
licenses(["notice"])

View File

@ -1,6 +1,7 @@
# Description:
# MLIR Tutorial
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
load("//mlir:tblgen.bzl", "gentbl_cc_library", "td_library")
licenses(["notice"])

View File

@ -1,6 +1,7 @@
# Description:
# MLIR Tutorial
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
load("//mlir:tblgen.bzl", "gentbl_cc_library", "td_library")
licenses(["notice"])