Skip to content

Commit 4a2d24e

Browse files
committed
[gn] Reformat build files
Ran: git ls-files '*.gn' '*.gni' | xargs llvm/utils/gn/gn.py format No behavior change.
1 parent 9ef9acb commit 4a2d24e

File tree

25 files changed

+31
-33
lines changed

25 files changed

+31
-33
lines changed

llvm/utils/gn/build/BUILD.gn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ config("compiler_defaults") {
186186
if (!is_clang) {
187187
# expand __VA_ARGS__ in "OPTION(...) LLVM_MAKE_OPT_ID(__VA_ARGS__)"
188188
cflags += [ "/Zc:preprocessor" ]
189+
189190
# cl.exe doesn't set __cplusplus correctly by default.
190191
# clang-cl gets it right by default, so don't needlessly add the flag there.
191192
cflags_cc += [ "/Zc:__cplusplus" ]

llvm/utils/gn/build/toolchain/target_flags.gni

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,10 @@ if (current_os == "android") {
4545
target_flags += [
4646
"-isysroot",
4747
rebase_path(mac_sdk_path, root_build_dir),
48+
4849
# TODO(lgrey): We should be getting this from `compiler_defaults`. Why
4950
# aren't we?
50-
"-mmacos-version-min=$mac_deployment_target",
51+
"-mmacos-version-min=$mac_deployment_target",
5152
]
5253
}
5354
} else if (current_os == "baremetal") {

llvm/utils/gn/secondary/BUILD.gn

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ group("default") {
2121
"//libcxxabi",
2222
]
2323
}
24-
if (current_os == "linux" || current_os == "win" || current_os=="mac") {
24+
if (current_os == "linux" || current_os == "win" || current_os == "mac") {
2525
deps += [ "//compiler-rt/test/asan" ]
2626
}
2727

2828
if (current_os == "linux" || current_os == "mac") {
29-
deps += [ "//compiler-rt/test/lsan"]
29+
deps += [ "//compiler-rt/test/lsan" ]
3030
}
3131

3232
if (current_os == "linux" || current_os == "android") {

llvm/utils/gn/secondary/clang-tools-extra/clang-doc/tool/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
copy("assets") {
22
sources = [
3-
"../assets/index.js",
43
"../assets/clang-doc-default-stylesheet.css",
4+
"../assets/index.js",
55
]
66
outputs = [ "$root_build_dir/share/clang-doc/{{source_file_part}}" ]
77
}

llvm/utils/gn/secondary/clang-tools-extra/clangd/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ static_library("clangd") {
5656
"//clang/lib/Serialization",
5757
"//clang/lib/Tooling",
5858
"//clang/lib/Tooling/Core",
59+
"//clang/lib/Tooling/DependencyScanning",
5960
"//clang/lib/Tooling/Inclusions",
6061
"//clang/lib/Tooling/Inclusions/Stdlib",
61-
"//clang/lib/Tooling/DependencyScanning",
6262
"//clang/lib/Tooling/Refactoring",
6363
"//clang/lib/Tooling/Syntax",
6464
"//llvm/lib/Support",

llvm/utils/gn/secondary/clang/test/BUILD.gn

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,13 @@ write_lit_config("lit_site_cfg") {
124124
"CMAKE_LIBRARY_OUTPUT_DIRECTORY=" + rebase_path("$root_out_dir/bin", dir),
125125
"LLVM_LIT_ERRC_MESSAGES=no such file or directory;is a directory;" +
126126
"invalid argument;permission denied",
127-
"PERL_EXECUTABLE="
127+
"PERL_EXECUTABLE=",
128128
]
129129
} else {
130130
extra_values += [
131131
"CMAKE_LIBRARY_OUTPUT_DIRECTORY=" + rebase_path("$root_out_dir/lib", dir),
132132
"LLVM_LIT_ERRC_MESSAGES=",
133-
"PERL_EXECUTABLE=/usr/bin/perl"
133+
"PERL_EXECUTABLE=/usr/bin/perl",
134134
]
135135
}
136136

llvm/utils/gn/secondary/clang/unittests/InstallAPI/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ unittest("InstallAPITests") {
77
"//llvm/lib/Testing/Support",
88
]
99
sources = [
10-
"HeaderFileTest.cpp",
1110
"FileListTest.cpp",
11+
"HeaderFileTest.cpp",
1212
]
1313
}

llvm/utils/gn/secondary/compiler-rt/lib/sanitizer_common/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,9 @@ source_set("sources") {
167167
"sanitizer_vector.h",
168168
"sanitizer_win.cpp",
169169
"sanitizer_win.h",
170+
"sanitizer_win_defs.h",
170171
"sanitizer_win_interception.cpp",
171172
"sanitizer_win_interception.h",
172-
"sanitizer_win_defs.h",
173173
"sanitizer_win_thunk_interception.h",
174174
]
175175
}

llvm/utils/gn/secondary/compiler-rt/test/hwasan/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ if (current_toolchain != host_toolchain) {
3737
":lit_site_cfg",
3838
"//compiler-rt/include($host_toolchain)",
3939
"//compiler-rt/lib/cfi:ignorelist($host_toolchain)",
40-
"//compiler-rt/lib/hwasan:hwasan_shared",
4140
"//compiler-rt/lib/hwasan:hwasan_preinit",
41+
"//compiler-rt/lib/hwasan:hwasan_shared",
4242
"//compiler-rt/test:lit_common_configured",
4343
"//llvm/utils/FileCheck($host_toolchain)",
4444
"//llvm/utils/llvm-lit($host_toolchain)",

llvm/utils/gn/secondary/compiler-rt/test/lsan/BUILD.gn

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ import("//llvm/version.gni")
77

88
write_cmake_config("asan_mode_cfg") {
99
input = "lit.site.cfg.py.in"
10-
output = "$target_gen_dir/${crt_current_target_arch}AsanConfig/lit.site.cfg.py"
10+
output =
11+
"$target_gen_dir/${crt_current_target_arch}AsanConfig/lit.site.cfg.py"
1112
values = [
1213
"LSAN_LIT_SOURCE_DIR=" + rebase_path("."),
1314
"LSAN_TEST_CONFIG_SUFFIX=$crt_current_target_suffix",
1415
"LSAN_TEST_TARGET_CFLAGS=$target_flags_string",
16+
1517
# TODO(lgrey): Support standalone mode
1618
"LSAN_LIT_TEST_MODE=AddressSanitizer",
1719
"LSAN_TEST_TARGET_ARCH=$crt_current_target_arch",
@@ -59,9 +61,7 @@ if (supported_toolchains != []) {
5961
test_dir = rebase_path(
6062
get_label_info(":lit_site_cfg($toolchain)", "target_gen_dir"),
6163
root_build_dir)
62-
args += [
63-
test_dir + "/${crt_current_target_arch}AsanConfig",
64-
]
64+
args += [ test_dir + "/${crt_current_target_arch}AsanConfig" ]
6565
}
6666
outputs = [ "$target_gen_dir/run-lit" ] # Non-existing, so that ninja runs
6767
# it each time.

llvm/utils/gn/secondary/libcxx/src/BUILD.gn

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,13 +317,13 @@ if (libcxx_enable_experimental) {
317317
sources = [ "experimental/keep.cpp" ]
318318
if (libcxx_enable_filesystem && libcxx_enable_time_zone_database) {
319319
sources += [
320+
# TODO TZDB The exception could be moved in chrono once the TZDB library
321+
# is no longer experimental.
322+
"experimental/chrono_exception.cpp",
320323
"experimental/include/tzdb/time_zone_private.h",
321324
"experimental/include/tzdb/types_private.h",
322325
"experimental/include/tzdb/tzdb_list_private.h",
323326
"experimental/include/tzdb/tzdb_private.h",
324-
# TODO TZDB The exception could be moved in chrono once the TZDB library
325-
# is no longer experimental.
326-
"experimental/chrono_exception.cpp",
327327
"experimental/time_zone.cpp",
328328
"experimental/tzdb.cpp",
329329
"experimental/tzdb_list.cpp",

llvm/utils/gn/secondary/lld/unittests/AsLibAll/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import("//third-party/unittest/unittest.gni")
33
unittest("LLDAsLibAllTests") {
44
configs += [ "//llvm/utils/gn/build:lld_code" ]
55
deps = [
6-
"//lld/Common",
76
"//lld/COFF",
7+
"//lld/Common",
88
"//lld/ELF",
99
"//lld/MachO",
1010
"//lld/MinGW",

llvm/utils/gn/secondary/lld/unittests/BUILD.gn

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ group("unittests") {
55
]
66
testonly = true
77
}
8-

llvm/utils/gn/secondary/lldb/test/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ group("test") {
164164
":lit_unit_site_cfg",
165165
"//clang/tools/driver:symlinks",
166166
"//lld/tools/lld:symlinks",
167-
"//lldb/tools/lldb-dap",
168167
"//lldb/tools/driver:lldb",
168+
"//lldb/tools/lldb-dap",
169169

170170
# XXX lldb-instr, darwin-debug, etc
171171
"//lldb/tools/lldb-server",

llvm/utils/gn/secondary/llvm/include/llvm/TargetParser/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ tablegen("RISCVTargetParserDef") {
2323

2424
group("gen") {
2525
deps = [
26-
":ARMTargetParserDef",
2726
":AArch64TargetParserDef",
27+
":ARMTargetParserDef",
2828
":RISCVTargetParserDef",
2929
]
3030
}

llvm/utils/gn/secondary/llvm/lib/CodeGenTypes/BUILD.gn

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@ static_library("CodeGenTypes") {
1010
]
1111
sources = [ "LowLevelType.cpp" ]
1212
}
13-

llvm/utils/gn/secondary/llvm/lib/DebugInfo/BTF/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ static_library("BTF") {
22
output_name = "LLVMDebugInfoBTF"
33
deps = [ "//llvm/lib/Support" ]
44
sources = [
5-
"BTFParser.cpp",
65
"BTFContext.cpp",
6+
"BTFParser.cpp",
77
]
88
}

llvm/utils/gn/secondary/llvm/lib/Target/WebAssembly/Utils/BUILD.gn

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,5 @@ static_library("Utils") {
1212
"//llvm/lib/Target/WebAssembly/TargetInfo",
1313
]
1414
include_dirs = [ ".." ]
15-
sources = [
16-
"WebAssemblyTypeUtilities.cpp",
17-
]
15+
sources = [ "WebAssemblyTypeUtilities.cpp" ]
1816
}

llvm/utils/gn/secondary/llvm/tools/llc/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ executable("llc") {
66
"//llvm/lib/CodeGen/MIRParser",
77
"//llvm/lib/CodeGen/SelectionDAG",
88
"//llvm/lib/IR",
9-
"//llvm/lib/IRReader",
109
"//llvm/lib/IRPrinter",
10+
"//llvm/lib/IRReader",
1111
"//llvm/lib/MC",
1212
"//llvm/lib/Passes",
1313
"//llvm/lib/Support",

llvm/utils/gn/secondary/llvm/tools/llvm-dwp/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import("//llvm/tools/binutils_symlinks.gni")
2+
import("//llvm/utils/TableGen/tablegen.gni")
23
import("//llvm/utils/gn/build/driver_executable.gni")
34
import("//llvm/utils/gn/build/symlink_or_copy.gni")
4-
import("//llvm/utils/TableGen/tablegen.gni")
55

66
tablegen("Opts") {
77
visibility = [ ":llvm-dwp" ]

llvm/utils/gn/secondary/llvm/tools/llvm-libtool-darwin/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import("//llvm/tools/cctools_symlinks.gni")
2+
import("//llvm/utils/TableGen/tablegen.gni")
23
import("//llvm/utils/gn/build/driver_executable.gni")
34
import("//llvm/utils/gn/build/symlink_or_copy.gni")
4-
import("//llvm/utils/TableGen/tablegen.gni")
55

66
tablegen("Opts") {
77
visibility = [ ":llvm-libtool-darwin" ]

llvm/utils/gn/secondary/llvm/tools/llvm-ml/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import("//llvm/utils/gn/build/driver_executable.gni")
21
import("//llvm/utils/TableGen/tablegen.gni")
2+
import("//llvm/utils/gn/build/driver_executable.gni")
33

44
tablegen("Opts") {
55
visibility = [ ":llvm-ml" ]

llvm/utils/gn/secondary/llvm/tools/sancov/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import("//llvm/utils/gn/build/driver_executable.gni")
21
import("//llvm/utils/TableGen/tablegen.gni")
2+
import("//llvm/utils/gn/build/driver_executable.gni")
33

44
tablegen("Opts") {
55
visibility = [ ":sancov" ]

llvm/utils/gn/secondary/llvm/unittests/Transforms/Instrumentation/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ unittest("InstrumentationTests") {
55
"//llvm/lib/Analysis",
66
"//llvm/lib/AsmParser",
77
"//llvm/lib/IR",
8-
"//llvm/lib/Transforms/Instrumentation",
98
"//llvm/lib/Passes",
109
"//llvm/lib/Support",
1110
"//llvm/lib/Testing/Support",
11+
"//llvm/lib/Transforms/Instrumentation",
1212
]
1313
sources = [ "PGOInstrumentationTest.cpp" ]
1414
}

llvm/utils/gn/secondary/llvm/utils/TableGen/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ executable("llvm-tblgen") {
6464
"SearchableTableEmitter.cpp",
6565
"SubtargetEmitter.cpp",
6666
"WebAssemblyDisassemblerEmitter.cpp",
67-
"X86InstrMappingEmitter.cpp",
6867
"X86DisassemblerTables.cpp",
6968
"X86FoldTablesEmitter.cpp",
69+
"X86InstrMappingEmitter.cpp",
7070
"X86MnemonicTables.cpp",
7171
"X86ModRMFilters.cpp",
7272
"X86RecognizableInstr.cpp",

0 commit comments

Comments
 (0)