[NFC] Reformat bzl files with buildifier

This commit is contained in:
Jordan Rupprecht
2024-02-12 11:35:17 -08:00
parent 54226e234f
commit 2fcfc9754a
15 changed files with 64 additions and 66 deletions

View File

@@ -2,9 +2,9 @@
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository", "new_git_repository")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository", "new_git_repository")
SKYLIB_VERSION = "1.3.0"
@@ -12,8 +12,8 @@ http_archive(
name = "bazel_skylib",
sha256 = "74d544d96f4a5bb630d465ca8bbcfe231e3594e5aae57e1edbf17a6eb3ca2506",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version=SKYLIB_VERSION),
"https://github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version=SKYLIB_VERSION),
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version = SKYLIB_VERSION),
"https://github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version = SKYLIB_VERSION),
],
)
@@ -113,6 +113,6 @@ maybe(
sha256 = "7c42d56fac126929a6a85dbc73ff1db2411d04f104fae9bdea51305663a83fd0",
strip_prefix = "zstd-1.5.2",
urls = [
"https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-1.5.2.tar.gz"
"https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-1.5.2.tar.gz",
],
)

View File

@@ -14,8 +14,8 @@ http_archive(
name = "bazel_skylib",
sha256 = "97e70364e9249702246c0e9444bccdc4b847bed1eb03c5a3ece4f83dfe6abc44",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version=SKYLIB_VERSION),
"https://github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version=SKYLIB_VERSION),
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version = SKYLIB_VERSION),
"https://github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version = SKYLIB_VERSION),
],
)
@@ -57,6 +57,6 @@ maybe(
sha256 = "7c42d56fac126929a6a85dbc73ff1db2411d04f104fae9bdea51305663a83fd0",
strip_prefix = "zstd-1.5.2",
urls = [
"https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-1.5.2.tar.gz"
"https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-1.5.2.tar.gz",
],
)

View File

@@ -12,8 +12,8 @@ http_archive(
name = "bazel_skylib",
sha256 = "97e70364e9249702246c0e9444bccdc4b847bed1eb03c5a3ece4f83dfe6abc44",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version=SKYLIB_VERSION),
"https://github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version=SKYLIB_VERSION),
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version = SKYLIB_VERSION),
"https://github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version = SKYLIB_VERSION),
],
)
@@ -46,6 +46,6 @@ maybe(
sha256 = "7c42d56fac126929a6a85dbc73ff1db2411d04f104fae9bdea51305663a83fd0",
strip_prefix = "zstd-1.5.2",
urls = [
"https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-1.5.2.tar.gz"
"https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-1.5.2.tar.gz",
],
)

View File

@@ -80,10 +80,10 @@ cc_library(
"//llvm:Analysis",
"//llvm:BinaryFormat",
"//llvm:CodeGen",
"//llvm:DWARFLinker",
"//llvm:DWP",
"//llvm:DebugInfoDWARF",
"//llvm:Demangle",
"//llvm:DWARFLinker",
"//llvm:JITLink",
"//llvm:MC",
"//llvm:MCDisassembler",

View File

@@ -3,10 +3,6 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
load("//:workspace_root.bzl", "workspace_root")
load("//llvm:tblgen.bzl", "gentbl")
load("//llvm:binary_alias.bzl", "binary_alias")
load("//llvm:cc_plugin_library.bzl", "cc_plugin_library")
load(
"//:vars.bzl",
"LLVM_VERSION",
@@ -14,6 +10,10 @@ load(
"LLVM_VERSION_MINOR",
"LLVM_VERSION_PATCH",
)
load("//:workspace_root.bzl", "workspace_root")
load("//llvm:binary_alias.bzl", "binary_alias")
load("//llvm:cc_plugin_library.bzl", "cc_plugin_library")
load("//llvm:tblgen.bzl", "gentbl")
package(
default_visibility = ["//visibility:public"],
@@ -2432,8 +2432,8 @@ cc_binary(
cc_binary(
name = "clang-format",
srcs = [
"tools/clang-format/ClangFormat.cpp",
"lib/Format/MatchFilePath.h",
"tools/clang-format/ClangFormat.cpp",
],
stamp = 0,
deps = [

View File

@@ -36,7 +36,7 @@ cc_library(
exclude = WIN32_ONLY_FILES,
) + select({
"@platforms//os:windows": WIN32_ONLY_FILES,
"//conditions:default": []
"//conditions:default": [],
}),
hdrs = glob([
"include/profile/*.h",
@@ -45,8 +45,8 @@ cc_library(
includes = [
"include",
],
linkstatic = True,
deps = [
":config",
],
linkstatic = True,
)

View File

@@ -82,10 +82,10 @@ def libc_function(
# original list, where this creates a new list and stores it in deps.
copts = copts or []
copts = copts + [
"-O3",
"-fno-builtin",
"-fno-lax-vector-conversions",
"-ftrivial-auto-var-init=pattern"
"-O3",
"-fno-builtin",
"-fno-lax-vector-conversions",
"-ftrivial-auto-var-init=pattern",
]
# We compile the code twice, the first target is suffixed with ".__internal__" and contains the

View File

@@ -46,8 +46,8 @@ libc_support_library(
"//libc:__support_cpp_type_traits",
"//libc:__support_fputil_fp_bits",
"//libc:__support_fputil_fpbits_str",
"//libc/test/UnitTest:fp_test_helpers",
"//libc/test/UnitTest:LibcUnitTest",
"//libc/test/UnitTest:fp_test_helpers",
"//libc/utils/MPFRWrapper:mpfr_impl",
],
)

View File

@@ -3,12 +3,12 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
load("//llvm:tblgen.bzl", "gentbl")
load("//llvm:binary_alias.bzl", "binary_alias")
load(
"//:vars.bzl",
"LLVM_VERSION",
)
load("//llvm:binary_alias.bzl", "binary_alias")
load("//llvm:tblgen.bzl", "gentbl")
package(
default_visibility = ["//visibility:public"],

View File

@@ -4860,7 +4860,7 @@ cc_library(
cc_binary(
name = "opt",
stamp = 0,
deps = [":opt-driver"]
deps = [":opt-driver"],
)
gentbl(
@@ -4979,9 +4979,9 @@ py_binary(
srcs = [
"utils/mlgo-utils/mlgo/__init__.py",
"utils/mlgo-utils/mlgo/corpus/extract_ir.py",
"utils/mlgo-utils/mlgo/corpus/extract_ir_lib.py"
"utils/mlgo-utils/mlgo/corpus/extract_ir_lib.py",
],
imports = ["utils/mlgo-utils"]
imports = ["utils/mlgo-utils"],
)
py_binary(
@@ -4989,9 +4989,9 @@ py_binary(
srcs = [
"utils/mlgo-utils/mlgo/__init__.py",
"utils/mlgo-utils/mlgo/corpus/combine_training_corpus.py",
"utils/mlgo-utils/mlgo/corpus/combine_training_corpus_lib.py"
"utils/mlgo-utils/mlgo/corpus/combine_training_corpus_lib.py",
],
imports = ["utils/mlgo-utils"]
imports = ["utils/mlgo-utils"],
)
py_binary(
@@ -4999,9 +4999,9 @@ py_binary(
srcs = [
"utils/mlgo-utils/mlgo/__init__.py",
"utils/mlgo-utils/mlgo/corpus/make_corpus.py",
"utils/mlgo-utils/mlgo/corpus/make_corpus_lib.py"
"utils/mlgo-utils/mlgo/corpus/make_corpus_lib.py",
],
imports = ["utils/mlgo-utils"]
imports = ["utils/mlgo-utils"],
)
cc_library(

View File

@@ -4552,8 +4552,8 @@ cc_library(
deps = [
":ControlFlowDialect",
":FuncDialect",
":InferTypeOpInterface",
":IR",
":InferTypeOpInterface",
":MeshShardingInterface",
],
)
@@ -8756,7 +8756,7 @@ cc_library(
":ROCDLTarget",
":ROCDLToLLVMIRTranslation",
":SPIRVToLLVMIRTranslation",
":VCIXToLLVMIRTranslation",
":VCIXToLLVMIRTranslation",
":X86VectorToLLVMIRTranslation",
],
)
@@ -9155,6 +9155,7 @@ cc_binary(
"//mlir/test:TestLinalg",
"//mlir/test:TestLoopLikeInterface",
"//mlir/test:TestMath",
"//mlir/test:TestMathToVCIX",
"//mlir/test:TestMemRef",
"//mlir/test:TestMesh",
"//mlir/test:TestNVGPU",
@@ -9175,7 +9176,6 @@ cc_binary(
"//mlir/test:TestTypeDialect",
"//mlir/test:TestVector",
"//mlir/test:TestVectorToSPIRV",
"//mlir/test:TestMathToVCIX",
],
)
@@ -13658,11 +13658,11 @@ cc_library(
hdrs = ["include/mlir/Dialect/LLVMIR/VCIXDialect.h"],
includes = ["include"],
deps = [
":GPUDialect",
":GPUDialect",
":IR",
":LLVMDialect",
":VCIXOpsIncGen",
":SideEffectInterfaces",
":VCIXOpsIncGen",
"//llvm:AsmParser",
"//llvm:Core",
"//llvm:Support",
@@ -13690,7 +13690,7 @@ gentbl_cc_library(
["-gen-op-defs"],
"include/mlir/Dialect/LLVMIR/VCIXOps.cpp.inc",
),
(
(
[
"-gen-dialect-decls",
"-dialect=vcix",
@@ -13731,9 +13731,9 @@ cc_library(
includes = ["include"],
deps = [
":IR",
":ToLLVMIRTranslation",
":VCIXConversionIncGen",
":VCIXDialect",
":ToLLVMIRTranslation",
"//llvm:Core",
"//llvm:Support",
],

View File

@@ -804,8 +804,6 @@ cc_library(
],
)
cc_library(
name = "TestMemRef",
srcs = glob(["lib/Dialect/MemRef/*.cpp"]),

View File

@@ -52,9 +52,9 @@ cc_library(
) + [
],
hdrs = [
"googletest/include/gtest/internal/gtest-port.h",
"googletest/include/gtest/gtest.h",
"googletest/include/gtest/gtest-spi.h",
"googletest/include/gtest/internal/gtest-port.h",
],
copts = llvm_copts,
defines = [

View File

@@ -32,49 +32,49 @@ cc_library(
name = "zlib",
srcs = select({
":llvm_zlib_enabled": [
"adler32_p.h",
"chunkset_tpl.h",
"crc32_p.h",
"crc32_tbl.h",
"crc32_comb_tbl.h",
"deflate.h",
"deflate_p.h",
"functable.h",
"fallback_builtins.h",
"inffast.h",
"inffixed_tbl.h",
"inflate.h",
"inflate_p.h",
"inftrees.h",
"insert_string_tpl.h",
"match_tpl.h",
"trees.h",
"trees_emit.h",
"trees_tbl.h",
"zbuild.h",
"zendian.h",
"zutil.h",
"adler32.c",
"adler32_p.h",
"chunkset.c",
"chunkset_tpl.h",
"compare258.c",
"compress.c",
"crc32.c",
"crc32_comb.c",
"crc32_comb_tbl.h",
"crc32_p.h",
"crc32_tbl.h",
"deflate.c",
"deflate.h",
"deflate_fast.c",
"deflate_medium.c",
"deflate_p.h",
"deflate_quick.c",
"deflate_slow.c",
"fallback_builtins.h",
"functable.c",
"functable.h",
"infback.c",
"inffast.c",
"inffast.h",
"inffixed_tbl.h",
"inflate.c",
"inflate.h",
"inflate_p.h",
"inftrees.c",
"inftrees.h",
"insert_string.c",
"insert_string_tpl.h",
"match_tpl.h",
"trees.c",
"trees.h",
"trees_emit.h",
"trees_tbl.h",
"uncompr.c",
"zutil_p.h",
"zbuild.h",
"zendian.h",
"zutil.c",
"zutil.h",
"zutil_p.h",
],
"//conditions:default": [],
}),

View File

@@ -37,8 +37,8 @@ cc_library(
}),
hdrs = select({
":llvm_zstd_enabled": [
"lib/zstd.h",
"lib/zdict.h",
"lib/zstd.h",
"lib/zstd_errors.h",
],
"//conditions:default": [],