[NFC][bazel] Run buildifier on all bzl/BUILD.bazel files
authorJordan Rupprecht <rupprecht@google.com>
Tue, 13 Dec 2022 00:30:51 +0000 (16:30 -0800)
committerJordan Rupprecht <rupprecht@google.com>
Tue, 13 Dec 2022 00:30:51 +0000 (16:30 -0800)
utils/bazel/llvm-project-overlay/bolt/BUILD.bazel
utils/bazel/llvm-project-overlay/libc/BUILD.bazel
utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl
utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel
utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel

index bc2dd02..25b8e0f 100644 (file)
@@ -19,12 +19,12 @@ cc_binary(
         ":Profile",
         ":Rewrite",
         ":Utils",
+        "//llvm:AllTargetsAsmParsers",
+        "//llvm:AllTargetsDisassemblers",
         "//llvm:MC",
         "//llvm:Object",
         "//llvm:Support",
-        "//llvm:AllTargetsAsmParsers",
-        "//llvm:AllTargetsDisassemblers",
-    ]
+    ],
 )
 
 cc_binary(
@@ -35,7 +35,7 @@ cc_binary(
     deps = [
         ":Profile",
         "//llvm:Support",
-    ]
+    ],
 )
 
 cc_binary(
@@ -48,9 +48,9 @@ cc_binary(
         ":Profile",
         ":Rewrite",
         ":RuntimeLibs",
-        ":Utils",
-        ":TargetX86",
         ":TargetAArch64",
+        ":TargetX86",
+        ":Utils",
         "//llvm:AllTargetsAsmParsers",
         "//llvm:AllTargetsCodeGens",
         "//llvm:AllTargetsDisassemblers",
@@ -108,10 +108,10 @@ cc_library(
     srcs = glob([
         "lib/RuntimeLibs/*.cpp",
     ]),
+    includes = ["include"],
     textual_hdrs = glob([
         "include/bolt/RuntimeLibs/*.h",
     ]) + ["include/bolt/RuntimeLibs/RuntimeLibraryVariables.inc"],
-    includes = ["include"],
     deps = [
         ":Core",
         ":Passes",
@@ -196,8 +196,6 @@ cc_library(
     includes = ["include"],
     deps = [
         ":Core",
-        "//llvm:X86CommonTableGen",
-        "//llvm:X86UtilsAndDesc",
         "//llvm:Analysis",
         "//llvm:BinaryFormat",
         "//llvm:CodeGen",
@@ -210,6 +208,8 @@ cc_library(
         "//llvm:MCParser",
         "//llvm:Object",
         "//llvm:Support",
+        "//llvm:X86CommonTableGen",
+        "//llvm:X86UtilsAndDesc",
     ],
 )
 
index f0e0af8..bf8e4de 100644 (file)
@@ -3,8 +3,12 @@
 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
 # LLVM libc project.
-load(":libc_build_rules.bzl", "libc_function", "libc_math_function",
-     "libc_support_library")
+load(
+    ":libc_build_rules.bzl",
+    "libc_function",
+    "libc_math_function",
+    "libc_support_library",
+)
 load(":platforms.bzl", "PLATFORM_CPU_ARM64", "PLATFORM_CPU_X86_64")
 load("@bazel_skylib//lib:selects.bzl", "selects")
 load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
index 14b1dbd..6a4c1a5 100644 (file)
@@ -19,6 +19,7 @@ def _libc_library(name, copts = None, **kwargs):
       **kwargs: All other attributes relevant for the cc_library rule.
     """
     copts = copts or []
+
     # We want all libc sources to be compiled with "hidden" visibility.
     # The public symbols will be given "default" visibility explicitly.
     # See src/__support/common.h for more information.
@@ -35,8 +36,14 @@ def _libc_library(name, copts = None, **kwargs):
 # libc_support_library.
 libc_support_library = _libc_library
 
-def libc_function(name, srcs, weak = False, deps = None, copts = None,
-                  local_defines = None, **kwargs):
+def libc_function(
+        name,
+        srcs,
+        weak = False,
+        deps = None,
+        copts = None,
+        local_defines = None,
+        **kwargs):
     """Add target for a libc function.
 
     The libc function is eventually available as a cc_library target by name
@@ -81,7 +88,7 @@ def libc_function(name, srcs, weak = False, deps = None, copts = None,
     if weak:
         func_attrs.append("__attribute__((weak))")
     local_defines = local_defines or ["LLVM_LIBC_PUBLIC_PACKAGING"]
-    local_defines.append("LLVM_LIBC_FUNCTION_ATTR='%s'" % ' '.join(func_attrs))
+    local_defines.append("LLVM_LIBC_FUNCTION_ATTR='%s'" % " ".join(func_attrs))
     _libc_library(
         name = name,
         srcs = srcs,
index f010d77..c522ed3 100644 (file)
@@ -544,7 +544,6 @@ filegroup(
     ],
 )
 
-
 ##---------------------------------------------------------------------------##
 # PythonTest dialect.
 ##---------------------------------------------------------------------------##
index 091ebb4..a400c63 100644 (file)
@@ -592,11 +592,11 @@ cc_library(
         "//mlir:AffineToStandard",
         "//mlir:FuncDialect",
         "//mlir:FuncToLLVM",
-        "//mlir:IndexToLLVM",
         "//mlir:IR",
+        "//mlir:IndexToLLVM",
+        "//mlir:LLVMDialect",
         "//mlir:LinalgToLLVM",
         "//mlir:LinalgTransforms",
-        "//mlir:LLVMDialect",
         "//mlir:MathToLLVM",
         "//mlir:MemRefToLLVM",
         "//mlir:Pass",