Skip to content

Commit 2fcfc97

Browse files
committed
[NFC] Reformat bzl files with buildifier
1 parent 54226e2 commit 2fcfc97

File tree

15 files changed

+63
-65
lines changed

15 files changed

+63
-65
lines changed

utils/bazel/WORKSPACE

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
# See https://llvm.org/LICENSE.txt for license information.
33
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44

5+
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository", "new_git_repository")
56
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
67
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
7-
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository", "new_git_repository")
88

99
SKYLIB_VERSION = "1.3.0"
1010

1111
http_archive(
1212
name = "bazel_skylib",
1313
sha256 = "74d544d96f4a5bb630d465ca8bbcfe231e3594e5aae57e1edbf17a6eb3ca2506",
1414
urls = [
15-
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version=SKYLIB_VERSION),
16-
"https://github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version=SKYLIB_VERSION),
15+
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version = SKYLIB_VERSION),
16+
"https://github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version = SKYLIB_VERSION),
1717
],
1818
)
1919

@@ -113,6 +113,6 @@ maybe(
113113
sha256 = "7c42d56fac126929a6a85dbc73ff1db2411d04f104fae9bdea51305663a83fd0",
114114
strip_prefix = "zstd-1.5.2",
115115
urls = [
116-
"https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-1.5.2.tar.gz"
116+
"https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-1.5.2.tar.gz",
117117
],
118118
)

utils/bazel/examples/http_archive/WORKSPACE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ http_archive(
1414
name = "bazel_skylib",
1515
sha256 = "97e70364e9249702246c0e9444bccdc4b847bed1eb03c5a3ece4f83dfe6abc44",
1616
urls = [
17-
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version=SKYLIB_VERSION),
18-
"https://github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version=SKYLIB_VERSION),
17+
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version = SKYLIB_VERSION),
18+
"https://github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version = SKYLIB_VERSION),
1919
],
2020
)
2121

@@ -57,6 +57,6 @@ maybe(
5757
sha256 = "7c42d56fac126929a6a85dbc73ff1db2411d04f104fae9bdea51305663a83fd0",
5858
strip_prefix = "zstd-1.5.2",
5959
urls = [
60-
"https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-1.5.2.tar.gz"
60+
"https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-1.5.2.tar.gz",
6161
],
6262
)

utils/bazel/examples/submodule/WORKSPACE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ http_archive(
1212
name = "bazel_skylib",
1313
sha256 = "97e70364e9249702246c0e9444bccdc4b847bed1eb03c5a3ece4f83dfe6abc44",
1414
urls = [
15-
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version=SKYLIB_VERSION),
16-
"https://github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version=SKYLIB_VERSION),
15+
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version = SKYLIB_VERSION),
16+
"https://github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version = SKYLIB_VERSION),
1717
],
1818
)
1919

@@ -46,6 +46,6 @@ maybe(
4646
sha256 = "7c42d56fac126929a6a85dbc73ff1db2411d04f104fae9bdea51305663a83fd0",
4747
strip_prefix = "zstd-1.5.2",
4848
urls = [
49-
"https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-1.5.2.tar.gz"
49+
"https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-1.5.2.tar.gz",
5050
],
5151
)

utils/bazel/llvm-project-overlay/bolt/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ cc_library(
8080
"//llvm:Analysis",
8181
"//llvm:BinaryFormat",
8282
"//llvm:CodeGen",
83+
"//llvm:DWARFLinker",
8384
"//llvm:DWP",
8485
"//llvm:DebugInfoDWARF",
8586
"//llvm:Demangle",
86-
"//llvm:DWARFLinker",
8787
"//llvm:JITLink",
8888
"//llvm:MC",
8989
"//llvm:MCDisassembler",

utils/bazel/llvm-project-overlay/clang/BUILD.bazel

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44

55
load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
6-
load("//:workspace_root.bzl", "workspace_root")
7-
load("//llvm:tblgen.bzl", "gentbl")
8-
load("//llvm:binary_alias.bzl", "binary_alias")
9-
load("//llvm:cc_plugin_library.bzl", "cc_plugin_library")
106
load(
117
"//:vars.bzl",
128
"LLVM_VERSION",
139
"LLVM_VERSION_MAJOR",
1410
"LLVM_VERSION_MINOR",
1511
"LLVM_VERSION_PATCH",
1612
)
13+
load("//:workspace_root.bzl", "workspace_root")
14+
load("//llvm:binary_alias.bzl", "binary_alias")
15+
load("//llvm:cc_plugin_library.bzl", "cc_plugin_library")
16+
load("//llvm:tblgen.bzl", "gentbl")
1717

1818
package(
1919
default_visibility = ["//visibility:public"],
@@ -2432,8 +2432,8 @@ cc_binary(
24322432
cc_binary(
24332433
name = "clang-format",
24342434
srcs = [
2435-
"tools/clang-format/ClangFormat.cpp",
24362435
"lib/Format/MatchFilePath.h",
2436+
"tools/clang-format/ClangFormat.cpp",
24372437
],
24382438
stamp = 0,
24392439
deps = [

utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ cc_library(
3636
exclude = WIN32_ONLY_FILES,
3737
) + select({
3838
"@platforms//os:windows": WIN32_ONLY_FILES,
39-
"//conditions:default": []
39+
"//conditions:default": [],
4040
}),
4141
hdrs = glob([
4242
"include/profile/*.h",
@@ -45,8 +45,8 @@ cc_library(
4545
includes = [
4646
"include",
4747
],
48+
linkstatic = True,
4849
deps = [
4950
":config",
5051
],
51-
linkstatic = True,
5252
)

utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ def libc_function(
8282
# original list, where this creates a new list and stores it in deps.
8383
copts = copts or []
8484
copts = copts + [
85-
"-O3",
86-
"-fno-builtin",
87-
"-fno-lax-vector-conversions",
88-
"-ftrivial-auto-var-init=pattern"
85+
"-O3",
86+
"-fno-builtin",
87+
"-fno-lax-vector-conversions",
88+
"-ftrivial-auto-var-init=pattern",
8989
]
9090

9191
# We compile the code twice, the first target is suffixed with ".__internal__" and contains the

utils/bazel/llvm-project-overlay/libc/utils/MPFRWrapper/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ libc_support_library(
4646
"//libc:__support_cpp_type_traits",
4747
"//libc:__support_fputil_fp_bits",
4848
"//libc:__support_fputil_fpbits_str",
49-
"//libc/test/UnitTest:fp_test_helpers",
5049
"//libc/test/UnitTest:LibcUnitTest",
50+
"//libc/test/UnitTest:fp_test_helpers",
5151
"//libc/utils/MPFRWrapper:mpfr_impl",
5252
],
5353
)

utils/bazel/llvm-project-overlay/lld/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44

55
load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
6-
load("//llvm:tblgen.bzl", "gentbl")
7-
load("//llvm:binary_alias.bzl", "binary_alias")
86
load(
97
"//:vars.bzl",
108
"LLVM_VERSION",
119
)
10+
load("//llvm:binary_alias.bzl", "binary_alias")
11+
load("//llvm:tblgen.bzl", "gentbl")
1212

1313
package(
1414
default_visibility = ["//visibility:public"],

utils/bazel/llvm-project-overlay/llvm/BUILD.bazel

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4860,7 +4860,7 @@ cc_library(
48604860
cc_binary(
48614861
name = "opt",
48624862
stamp = 0,
4863-
deps = [":opt-driver"]
4863+
deps = [":opt-driver"],
48644864
)
48654865

48664866
gentbl(
@@ -4979,29 +4979,29 @@ py_binary(
49794979
srcs = [
49804980
"utils/mlgo-utils/mlgo/__init__.py",
49814981
"utils/mlgo-utils/mlgo/corpus/extract_ir.py",
4982-
"utils/mlgo-utils/mlgo/corpus/extract_ir_lib.py"
4982+
"utils/mlgo-utils/mlgo/corpus/extract_ir_lib.py",
49834983
],
4984-
imports = ["utils/mlgo-utils"]
4984+
imports = ["utils/mlgo-utils"],
49854985
)
49864986

49874987
py_binary(
49884988
name = "combine_training_corpus",
49894989
srcs = [
49904990
"utils/mlgo-utils/mlgo/__init__.py",
49914991
"utils/mlgo-utils/mlgo/corpus/combine_training_corpus.py",
4992-
"utils/mlgo-utils/mlgo/corpus/combine_training_corpus_lib.py"
4992+
"utils/mlgo-utils/mlgo/corpus/combine_training_corpus_lib.py",
49934993
],
4994-
imports = ["utils/mlgo-utils"]
4994+
imports = ["utils/mlgo-utils"],
49954995
)
49964996

49974997
py_binary(
49984998
name = "make_corpus",
49994999
srcs = [
50005000
"utils/mlgo-utils/mlgo/__init__.py",
50015001
"utils/mlgo-utils/mlgo/corpus/make_corpus.py",
5002-
"utils/mlgo-utils/mlgo/corpus/make_corpus_lib.py"
5002+
"utils/mlgo-utils/mlgo/corpus/make_corpus_lib.py",
50035003
],
5004-
imports = ["utils/mlgo-utils"]
5004+
imports = ["utils/mlgo-utils"],
50055005
)
50065006

50075007
cc_library(

utils/bazel/llvm-project-overlay/mlir/BUILD.bazel

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4552,8 +4552,8 @@ cc_library(
45524552
deps = [
45534553
":ControlFlowDialect",
45544554
":FuncDialect",
4555-
":InferTypeOpInterface",
45564555
":IR",
4556+
":InferTypeOpInterface",
45574557
":MeshShardingInterface",
45584558
],
45594559
)
@@ -8756,7 +8756,7 @@ cc_library(
87568756
":ROCDLTarget",
87578757
":ROCDLToLLVMIRTranslation",
87588758
":SPIRVToLLVMIRTranslation",
8759-
":VCIXToLLVMIRTranslation",
8759+
":VCIXToLLVMIRTranslation",
87608760
":X86VectorToLLVMIRTranslation",
87618761
],
87628762
)
@@ -9155,6 +9155,7 @@ cc_binary(
91559155
"//mlir/test:TestLinalg",
91569156
"//mlir/test:TestLoopLikeInterface",
91579157
"//mlir/test:TestMath",
9158+
"//mlir/test:TestMathToVCIX",
91589159
"//mlir/test:TestMemRef",
91599160
"//mlir/test:TestMesh",
91609161
"//mlir/test:TestNVGPU",
@@ -9175,7 +9176,6 @@ cc_binary(
91759176
"//mlir/test:TestTypeDialect",
91769177
"//mlir/test:TestVector",
91779178
"//mlir/test:TestVectorToSPIRV",
9178-
"//mlir/test:TestMathToVCIX",
91799179
],
91809180
)
91819181

@@ -13658,11 +13658,11 @@ cc_library(
1365813658
hdrs = ["include/mlir/Dialect/LLVMIR/VCIXDialect.h"],
1365913659
includes = ["include"],
1366013660
deps = [
13661-
":GPUDialect",
13661+
":GPUDialect",
1366213662
":IR",
1366313663
":LLVMDialect",
13664-
":VCIXOpsIncGen",
1366513664
":SideEffectInterfaces",
13665+
":VCIXOpsIncGen",
1366613666
"//llvm:AsmParser",
1366713667
"//llvm:Core",
1366813668
"//llvm:Support",
@@ -13690,7 +13690,7 @@ gentbl_cc_library(
1369013690
["-gen-op-defs"],
1369113691
"include/mlir/Dialect/LLVMIR/VCIXOps.cpp.inc",
1369213692
),
13693-
(
13693+
(
1369413694
[
1369513695
"-gen-dialect-decls",
1369613696
"-dialect=vcix",
@@ -13731,9 +13731,9 @@ cc_library(
1373113731
includes = ["include"],
1373213732
deps = [
1373313733
":IR",
13734+
":ToLLVMIRTranslation",
1373413735
":VCIXConversionIncGen",
1373513736
":VCIXDialect",
13736-
":ToLLVMIRTranslation",
1373713737
"//llvm:Core",
1373813738
"//llvm:Support",
1373913739
],

utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -804,8 +804,6 @@ cc_library(
804804
],
805805
)
806806

807-
808-
809807
cc_library(
810808
name = "TestMemRef",
811809
srcs = glob(["lib/Dialect/MemRef/*.cpp"]),

utils/bazel/llvm-project-overlay/third-party/unittest/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ cc_library(
5252
) + [
5353
],
5454
hdrs = [
55-
"googletest/include/gtest/internal/gtest-port.h",
5655
"googletest/include/gtest/gtest.h",
5756
"googletest/include/gtest/gtest-spi.h",
57+
"googletest/include/gtest/internal/gtest-port.h",
5858
],
5959
copts = llvm_copts,
6060
defines = [

utils/bazel/third_party_build/zlib-ng.BUILD

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -32,49 +32,49 @@ cc_library(
3232
name = "zlib",
3333
srcs = select({
3434
":llvm_zlib_enabled": [
35+
"adler32.c",
3536
"adler32_p.h",
37+
"chunkset.c",
3638
"chunkset_tpl.h",
39+
"compare258.c",
40+
"compress.c",
41+
"crc32.c",
42+
"crc32_comb.c",
43+
"crc32_comb_tbl.h",
3744
"crc32_p.h",
3845
"crc32_tbl.h",
39-
"crc32_comb_tbl.h",
46+
"deflate.c",
4047
"deflate.h",
48+
"deflate_fast.c",
49+
"deflate_medium.c",
4150
"deflate_p.h",
42-
"functable.h",
51+
"deflate_quick.c",
52+
"deflate_slow.c",
4353
"fallback_builtins.h",
54+
"functable.c",
55+
"functable.h",
56+
"infback.c",
57+
"inffast.c",
4458
"inffast.h",
4559
"inffixed_tbl.h",
60+
"inflate.c",
4661
"inflate.h",
4762
"inflate_p.h",
63+
"inftrees.c",
4864
"inftrees.h",
65+
"insert_string.c",
4966
"insert_string_tpl.h",
5067
"match_tpl.h",
68+
"trees.c",
5169
"trees.h",
5270
"trees_emit.h",
5371
"trees_tbl.h",
72+
"uncompr.c",
5473
"zbuild.h",
5574
"zendian.h",
75+
"zutil.c",
5676
"zutil.h",
57-
"adler32.c",
58-
"chunkset.c",
59-
"compare258.c",
60-
"compress.c",
61-
"crc32.c",
62-
"crc32_comb.c",
63-
"deflate.c",
64-
"deflate_fast.c",
65-
"deflate_medium.c",
66-
"deflate_quick.c",
67-
"deflate_slow.c",
68-
"functable.c",
69-
"infback.c",
70-
"inffast.c",
71-
"inflate.c",
72-
"inftrees.c",
73-
"insert_string.c",
74-
"trees.c",
75-
"uncompr.c",
7677
"zutil_p.h",
77-
"zutil.c",
7878
],
7979
"//conditions:default": [],
8080
}),

utils/bazel/third_party_build/zstd.BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ cc_library(
3737
}),
3838
hdrs = select({
3939
":llvm_zstd_enabled": [
40-
"lib/zstd.h",
4140
"lib/zdict.h",
41+
"lib/zstd.h",
4242
"lib/zstd_errors.h",
4343
],
4444
"//conditions:default": [],

0 commit comments

Comments
 (0)