[llvm] 4a2d24e - [gn] Reformat build files
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 24 17:22:59 PDT 2024
Author: Nico Weber
Date: 2024-09-24T20:22:36-04:00
New Revision: 4a2d24e814295436d0c8f928897e2c55fe0214a6
URL: https://github.com/llvm/llvm-project/commit/4a2d24e814295436d0c8f928897e2c55fe0214a6
DIFF: https://github.com/llvm/llvm-project/commit/4a2d24e814295436d0c8f928897e2c55fe0214a6.diff
LOG: [gn] Reformat build files
Ran:
git ls-files '*.gn' '*.gni' | xargs llvm/utils/gn/gn.py format
No behavior change.
Added:
Modified:
llvm/utils/gn/build/BUILD.gn
llvm/utils/gn/build/toolchain/target_flags.gni
llvm/utils/gn/secondary/BUILD.gn
llvm/utils/gn/secondary/clang-tools-extra/clang-doc/tool/BUILD.gn
llvm/utils/gn/secondary/clang-tools-extra/clangd/BUILD.gn
llvm/utils/gn/secondary/clang/test/BUILD.gn
llvm/utils/gn/secondary/clang/unittests/InstallAPI/BUILD.gn
llvm/utils/gn/secondary/compiler-rt/lib/sanitizer_common/BUILD.gn
llvm/utils/gn/secondary/compiler-rt/test/hwasan/BUILD.gn
llvm/utils/gn/secondary/compiler-rt/test/lsan/BUILD.gn
llvm/utils/gn/secondary/libcxx/src/BUILD.gn
llvm/utils/gn/secondary/lld/unittests/AsLibAll/BUILD.gn
llvm/utils/gn/secondary/lld/unittests/BUILD.gn
llvm/utils/gn/secondary/lldb/test/BUILD.gn
llvm/utils/gn/secondary/llvm/include/llvm/TargetParser/BUILD.gn
llvm/utils/gn/secondary/llvm/lib/CodeGenTypes/BUILD.gn
llvm/utils/gn/secondary/llvm/lib/DebugInfo/BTF/BUILD.gn
llvm/utils/gn/secondary/llvm/lib/Target/WebAssembly/Utils/BUILD.gn
llvm/utils/gn/secondary/llvm/tools/llc/BUILD.gn
llvm/utils/gn/secondary/llvm/tools/llvm-dwp/BUILD.gn
llvm/utils/gn/secondary/llvm/tools/llvm-libtool-darwin/BUILD.gn
llvm/utils/gn/secondary/llvm/tools/llvm-ml/BUILD.gn
llvm/utils/gn/secondary/llvm/tools/sancov/BUILD.gn
llvm/utils/gn/secondary/llvm/unittests/Transforms/Instrumentation/BUILD.gn
llvm/utils/gn/secondary/llvm/utils/TableGen/BUILD.gn
Removed:
################################################################################
diff --git a/llvm/utils/gn/build/BUILD.gn b/llvm/utils/gn/build/BUILD.gn
index 27f95bb5a49f1f..0b0f62721d374c 100644
--- a/llvm/utils/gn/build/BUILD.gn
+++ b/llvm/utils/gn/build/BUILD.gn
@@ -186,6 +186,7 @@ config("compiler_defaults") {
if (!is_clang) {
# expand __VA_ARGS__ in "OPTION(...) LLVM_MAKE_OPT_ID(__VA_ARGS__)"
cflags += [ "/Zc:preprocessor" ]
+
# cl.exe doesn't set __cplusplus correctly by default.
# clang-cl gets it right by default, so don't needlessly add the flag there.
cflags_cc += [ "/Zc:__cplusplus" ]
diff --git a/llvm/utils/gn/build/toolchain/target_flags.gni b/llvm/utils/gn/build/toolchain/target_flags.gni
index cbfa22966b48f4..50d31a3da85fc5 100644
--- a/llvm/utils/gn/build/toolchain/target_flags.gni
+++ b/llvm/utils/gn/build/toolchain/target_flags.gni
@@ -45,9 +45,10 @@ if (current_os == "android") {
target_flags += [
"-isysroot",
rebase_path(mac_sdk_path, root_build_dir),
+
# TODO(lgrey): We should be getting this from `compiler_defaults`. Why
# aren't we?
- "-mmacos-version-min=$mac_deployment_target",
+ "-mmacos-version-min=$mac_deployment_target",
]
}
} else if (current_os == "baremetal") {
diff --git a/llvm/utils/gn/secondary/BUILD.gn b/llvm/utils/gn/secondary/BUILD.gn
index a17a2fdb7a3ca5..7f6b4cb43239f9 100644
--- a/llvm/utils/gn/secondary/BUILD.gn
+++ b/llvm/utils/gn/secondary/BUILD.gn
@@ -21,12 +21,12 @@ group("default") {
"//libcxxabi",
]
}
- if (current_os == "linux" || current_os == "win" || current_os=="mac") {
+ if (current_os == "linux" || current_os == "win" || current_os == "mac") {
deps += [ "//compiler-rt/test/asan" ]
}
if (current_os == "linux" || current_os == "mac") {
- deps += [ "//compiler-rt/test/lsan"]
+ deps += [ "//compiler-rt/test/lsan" ]
}
if (current_os == "linux" || current_os == "android") {
diff --git a/llvm/utils/gn/secondary/clang-tools-extra/clang-doc/tool/BUILD.gn b/llvm/utils/gn/secondary/clang-tools-extra/clang-doc/tool/BUILD.gn
index b224df093c7748..47dd70e629fb36 100644
--- a/llvm/utils/gn/secondary/clang-tools-extra/clang-doc/tool/BUILD.gn
+++ b/llvm/utils/gn/secondary/clang-tools-extra/clang-doc/tool/BUILD.gn
@@ -1,7 +1,7 @@
copy("assets") {
sources = [
- "../assets/index.js",
"../assets/clang-doc-default-stylesheet.css",
+ "../assets/index.js",
]
outputs = [ "$root_build_dir/share/clang-doc/{{source_file_part}}" ]
}
diff --git a/llvm/utils/gn/secondary/clang-tools-extra/clangd/BUILD.gn b/llvm/utils/gn/secondary/clang-tools-extra/clangd/BUILD.gn
index a116c0abe0b2cc..c6b45efef29901 100644
--- a/llvm/utils/gn/secondary/clang-tools-extra/clangd/BUILD.gn
+++ b/llvm/utils/gn/secondary/clang-tools-extra/clangd/BUILD.gn
@@ -56,9 +56,9 @@ static_library("clangd") {
"//clang/lib/Serialization",
"//clang/lib/Tooling",
"//clang/lib/Tooling/Core",
+ "//clang/lib/Tooling/DependencyScanning",
"//clang/lib/Tooling/Inclusions",
"//clang/lib/Tooling/Inclusions/Stdlib",
- "//clang/lib/Tooling/DependencyScanning",
"//clang/lib/Tooling/Refactoring",
"//clang/lib/Tooling/Syntax",
"//llvm/lib/Support",
diff --git a/llvm/utils/gn/secondary/clang/test/BUILD.gn b/llvm/utils/gn/secondary/clang/test/BUILD.gn
index 1d5b8025a12acb..97610d4c95749d 100644
--- a/llvm/utils/gn/secondary/clang/test/BUILD.gn
+++ b/llvm/utils/gn/secondary/clang/test/BUILD.gn
@@ -124,13 +124,13 @@ write_lit_config("lit_site_cfg") {
"CMAKE_LIBRARY_OUTPUT_DIRECTORY=" + rebase_path("$root_out_dir/bin", dir),
"LLVM_LIT_ERRC_MESSAGES=no such file or directory;is a directory;" +
"invalid argument;permission denied",
- "PERL_EXECUTABLE="
+ "PERL_EXECUTABLE=",
]
} else {
extra_values += [
"CMAKE_LIBRARY_OUTPUT_DIRECTORY=" + rebase_path("$root_out_dir/lib", dir),
"LLVM_LIT_ERRC_MESSAGES=",
- "PERL_EXECUTABLE=/usr/bin/perl"
+ "PERL_EXECUTABLE=/usr/bin/perl",
]
}
diff --git a/llvm/utils/gn/secondary/clang/unittests/InstallAPI/BUILD.gn b/llvm/utils/gn/secondary/clang/unittests/InstallAPI/BUILD.gn
index e27659457474f2..b8bf438bfdb486 100644
--- a/llvm/utils/gn/secondary/clang/unittests/InstallAPI/BUILD.gn
+++ b/llvm/utils/gn/secondary/clang/unittests/InstallAPI/BUILD.gn
@@ -7,7 +7,7 @@ unittest("InstallAPITests") {
"//llvm/lib/Testing/Support",
]
sources = [
- "HeaderFileTest.cpp",
"FileListTest.cpp",
+ "HeaderFileTest.cpp",
]
}
diff --git a/llvm/utils/gn/secondary/compiler-rt/lib/sanitizer_common/BUILD.gn b/llvm/utils/gn/secondary/compiler-rt/lib/sanitizer_common/BUILD.gn
index 450c419d25fe88..e398119fb38a95 100644
--- a/llvm/utils/gn/secondary/compiler-rt/lib/sanitizer_common/BUILD.gn
+++ b/llvm/utils/gn/secondary/compiler-rt/lib/sanitizer_common/BUILD.gn
@@ -167,9 +167,9 @@ source_set("sources") {
"sanitizer_vector.h",
"sanitizer_win.cpp",
"sanitizer_win.h",
+ "sanitizer_win_defs.h",
"sanitizer_win_interception.cpp",
"sanitizer_win_interception.h",
- "sanitizer_win_defs.h",
"sanitizer_win_thunk_interception.h",
]
}
diff --git a/llvm/utils/gn/secondary/compiler-rt/test/hwasan/BUILD.gn b/llvm/utils/gn/secondary/compiler-rt/test/hwasan/BUILD.gn
index 59ed1d1480967e..7bdf9c2b994c90 100644
--- a/llvm/utils/gn/secondary/compiler-rt/test/hwasan/BUILD.gn
+++ b/llvm/utils/gn/secondary/compiler-rt/test/hwasan/BUILD.gn
@@ -37,8 +37,8 @@ if (current_toolchain != host_toolchain) {
":lit_site_cfg",
"//compiler-rt/include($host_toolchain)",
"//compiler-rt/lib/cfi:ignorelist($host_toolchain)",
- "//compiler-rt/lib/hwasan:hwasan_shared",
"//compiler-rt/lib/hwasan:hwasan_preinit",
+ "//compiler-rt/lib/hwasan:hwasan_shared",
"//compiler-rt/test:lit_common_configured",
"//llvm/utils/FileCheck($host_toolchain)",
"//llvm/utils/llvm-lit($host_toolchain)",
diff --git a/llvm/utils/gn/secondary/compiler-rt/test/lsan/BUILD.gn b/llvm/utils/gn/secondary/compiler-rt/test/lsan/BUILD.gn
index 4fb375f06caae3..7dc69af57124c3 100644
--- a/llvm/utils/gn/secondary/compiler-rt/test/lsan/BUILD.gn
+++ b/llvm/utils/gn/secondary/compiler-rt/test/lsan/BUILD.gn
@@ -7,11 +7,13 @@ import("//llvm/version.gni")
write_cmake_config("asan_mode_cfg") {
input = "lit.site.cfg.py.in"
- output = "$target_gen_dir/${crt_current_target_arch}AsanConfig/lit.site.cfg.py"
+ output =
+ "$target_gen_dir/${crt_current_target_arch}AsanConfig/lit.site.cfg.py"
values = [
"LSAN_LIT_SOURCE_DIR=" + rebase_path("."),
"LSAN_TEST_CONFIG_SUFFIX=$crt_current_target_suffix",
"LSAN_TEST_TARGET_CFLAGS=$target_flags_string",
+
# TODO(lgrey): Support standalone mode
"LSAN_LIT_TEST_MODE=AddressSanitizer",
"LSAN_TEST_TARGET_ARCH=$crt_current_target_arch",
@@ -59,9 +61,7 @@ if (supported_toolchains != []) {
test_dir = rebase_path(
get_label_info(":lit_site_cfg($toolchain)", "target_gen_dir"),
root_build_dir)
- args += [
- test_dir + "/${crt_current_target_arch}AsanConfig",
- ]
+ args += [ test_dir + "/${crt_current_target_arch}AsanConfig" ]
}
outputs = [ "$target_gen_dir/run-lit" ] # Non-existing, so that ninja runs
# it each time.
diff --git a/llvm/utils/gn/secondary/libcxx/src/BUILD.gn b/llvm/utils/gn/secondary/libcxx/src/BUILD.gn
index a94674a61873d9..29e864957a5e1e 100644
--- a/llvm/utils/gn/secondary/libcxx/src/BUILD.gn
+++ b/llvm/utils/gn/secondary/libcxx/src/BUILD.gn
@@ -317,13 +317,13 @@ if (libcxx_enable_experimental) {
sources = [ "experimental/keep.cpp" ]
if (libcxx_enable_filesystem && libcxx_enable_time_zone_database) {
sources += [
+ # TODO TZDB The exception could be moved in chrono once the TZDB library
+ # is no longer experimental.
+ "experimental/chrono_exception.cpp",
"experimental/include/tzdb/time_zone_private.h",
"experimental/include/tzdb/types_private.h",
"experimental/include/tzdb/tzdb_list_private.h",
"experimental/include/tzdb/tzdb_private.h",
- # TODO TZDB The exception could be moved in chrono once the TZDB library
- # is no longer experimental.
- "experimental/chrono_exception.cpp",
"experimental/time_zone.cpp",
"experimental/tzdb.cpp",
"experimental/tzdb_list.cpp",
diff --git a/llvm/utils/gn/secondary/lld/unittests/AsLibAll/BUILD.gn b/llvm/utils/gn/secondary/lld/unittests/AsLibAll/BUILD.gn
index d6af6a1c73792a..6eb82ea61a1b03 100644
--- a/llvm/utils/gn/secondary/lld/unittests/AsLibAll/BUILD.gn
+++ b/llvm/utils/gn/secondary/lld/unittests/AsLibAll/BUILD.gn
@@ -3,8 +3,8 @@ import("//third-party/unittest/unittest.gni")
unittest("LLDAsLibAllTests") {
configs += [ "//llvm/utils/gn/build:lld_code" ]
deps = [
- "//lld/Common",
"//lld/COFF",
+ "//lld/Common",
"//lld/ELF",
"//lld/MachO",
"//lld/MinGW",
diff --git a/llvm/utils/gn/secondary/lld/unittests/BUILD.gn b/llvm/utils/gn/secondary/lld/unittests/BUILD.gn
index c909670f4b1bad..6faaa12faad0d4 100644
--- a/llvm/utils/gn/secondary/lld/unittests/BUILD.gn
+++ b/llvm/utils/gn/secondary/lld/unittests/BUILD.gn
@@ -5,4 +5,3 @@ group("unittests") {
]
testonly = true
}
-
diff --git a/llvm/utils/gn/secondary/lldb/test/BUILD.gn b/llvm/utils/gn/secondary/lldb/test/BUILD.gn
index e903d16e338c93..369b24f97d7b14 100644
--- a/llvm/utils/gn/secondary/lldb/test/BUILD.gn
+++ b/llvm/utils/gn/secondary/lldb/test/BUILD.gn
@@ -164,8 +164,8 @@ group("test") {
":lit_unit_site_cfg",
"//clang/tools/driver:symlinks",
"//lld/tools/lld:symlinks",
- "//lldb/tools/lldb-dap",
"//lldb/tools/driver:lldb",
+ "//lldb/tools/lldb-dap",
# XXX lldb-instr, darwin-debug, etc
"//lldb/tools/lldb-server",
diff --git a/llvm/utils/gn/secondary/llvm/include/llvm/TargetParser/BUILD.gn b/llvm/utils/gn/secondary/llvm/include/llvm/TargetParser/BUILD.gn
index a71dfa518b1df3..455a8265fce87e 100644
--- a/llvm/utils/gn/secondary/llvm/include/llvm/TargetParser/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/include/llvm/TargetParser/BUILD.gn
@@ -23,8 +23,8 @@ tablegen("RISCVTargetParserDef") {
group("gen") {
deps = [
- ":ARMTargetParserDef",
":AArch64TargetParserDef",
+ ":ARMTargetParserDef",
":RISCVTargetParserDef",
]
}
diff --git a/llvm/utils/gn/secondary/llvm/lib/CodeGenTypes/BUILD.gn b/llvm/utils/gn/secondary/llvm/lib/CodeGenTypes/BUILD.gn
index 5df31c33a3ad0d..04f819d36d5814 100644
--- a/llvm/utils/gn/secondary/llvm/lib/CodeGenTypes/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/lib/CodeGenTypes/BUILD.gn
@@ -10,4 +10,3 @@ static_library("CodeGenTypes") {
]
sources = [ "LowLevelType.cpp" ]
}
-
diff --git a/llvm/utils/gn/secondary/llvm/lib/DebugInfo/BTF/BUILD.gn b/llvm/utils/gn/secondary/llvm/lib/DebugInfo/BTF/BUILD.gn
index 74c1362c697b91..803dd867199dee 100644
--- a/llvm/utils/gn/secondary/llvm/lib/DebugInfo/BTF/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/lib/DebugInfo/BTF/BUILD.gn
@@ -2,7 +2,7 @@ static_library("BTF") {
output_name = "LLVMDebugInfoBTF"
deps = [ "//llvm/lib/Support" ]
sources = [
- "BTFParser.cpp",
"BTFContext.cpp",
+ "BTFParser.cpp",
]
}
diff --git a/llvm/utils/gn/secondary/llvm/lib/Target/WebAssembly/Utils/BUILD.gn b/llvm/utils/gn/secondary/llvm/lib/Target/WebAssembly/Utils/BUILD.gn
index a4a6889dcb4a5f..1fba8640a2a2b7 100644
--- a/llvm/utils/gn/secondary/llvm/lib/Target/WebAssembly/Utils/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/lib/Target/WebAssembly/Utils/BUILD.gn
@@ -12,7 +12,5 @@ static_library("Utils") {
"//llvm/lib/Target/WebAssembly/TargetInfo",
]
include_dirs = [ ".." ]
- sources = [
- "WebAssemblyTypeUtilities.cpp",
- ]
+ sources = [ "WebAssemblyTypeUtilities.cpp" ]
}
diff --git a/llvm/utils/gn/secondary/llvm/tools/llc/BUILD.gn b/llvm/utils/gn/secondary/llvm/tools/llc/BUILD.gn
index a968760e1c2a35..8756ee512d01b5 100644
--- a/llvm/utils/gn/secondary/llvm/tools/llc/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/tools/llc/BUILD.gn
@@ -6,8 +6,8 @@ executable("llc") {
"//llvm/lib/CodeGen/MIRParser",
"//llvm/lib/CodeGen/SelectionDAG",
"//llvm/lib/IR",
- "//llvm/lib/IRReader",
"//llvm/lib/IRPrinter",
+ "//llvm/lib/IRReader",
"//llvm/lib/MC",
"//llvm/lib/Passes",
"//llvm/lib/Support",
diff --git a/llvm/utils/gn/secondary/llvm/tools/llvm-dwp/BUILD.gn b/llvm/utils/gn/secondary/llvm/tools/llvm-dwp/BUILD.gn
index 01f8d0f134dd26..49cccaa5b215c0 100644
--- a/llvm/utils/gn/secondary/llvm/tools/llvm-dwp/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/tools/llvm-dwp/BUILD.gn
@@ -1,7 +1,7 @@
import("//llvm/tools/binutils_symlinks.gni")
+import("//llvm/utils/TableGen/tablegen.gni")
import("//llvm/utils/gn/build/driver_executable.gni")
import("//llvm/utils/gn/build/symlink_or_copy.gni")
-import("//llvm/utils/TableGen/tablegen.gni")
tablegen("Opts") {
visibility = [ ":llvm-dwp" ]
diff --git a/llvm/utils/gn/secondary/llvm/tools/llvm-libtool-darwin/BUILD.gn b/llvm/utils/gn/secondary/llvm/tools/llvm-libtool-darwin/BUILD.gn
index c974cae267371d..034201adf779e3 100644
--- a/llvm/utils/gn/secondary/llvm/tools/llvm-libtool-darwin/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/tools/llvm-libtool-darwin/BUILD.gn
@@ -1,7 +1,7 @@
import("//llvm/tools/cctools_symlinks.gni")
+import("//llvm/utils/TableGen/tablegen.gni")
import("//llvm/utils/gn/build/driver_executable.gni")
import("//llvm/utils/gn/build/symlink_or_copy.gni")
-import("//llvm/utils/TableGen/tablegen.gni")
tablegen("Opts") {
visibility = [ ":llvm-libtool-darwin" ]
diff --git a/llvm/utils/gn/secondary/llvm/tools/llvm-ml/BUILD.gn b/llvm/utils/gn/secondary/llvm/tools/llvm-ml/BUILD.gn
index b094f0e59bcce9..9e3fb96861dbd1 100644
--- a/llvm/utils/gn/secondary/llvm/tools/llvm-ml/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/tools/llvm-ml/BUILD.gn
@@ -1,5 +1,5 @@
-import("//llvm/utils/gn/build/driver_executable.gni")
import("//llvm/utils/TableGen/tablegen.gni")
+import("//llvm/utils/gn/build/driver_executable.gni")
tablegen("Opts") {
visibility = [ ":llvm-ml" ]
diff --git a/llvm/utils/gn/secondary/llvm/tools/sancov/BUILD.gn b/llvm/utils/gn/secondary/llvm/tools/sancov/BUILD.gn
index ff0fd700c911ac..9057072f3c0952 100644
--- a/llvm/utils/gn/secondary/llvm/tools/sancov/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/tools/sancov/BUILD.gn
@@ -1,5 +1,5 @@
-import("//llvm/utils/gn/build/driver_executable.gni")
import("//llvm/utils/TableGen/tablegen.gni")
+import("//llvm/utils/gn/build/driver_executable.gni")
tablegen("Opts") {
visibility = [ ":sancov" ]
diff --git a/llvm/utils/gn/secondary/llvm/unittests/Transforms/Instrumentation/BUILD.gn b/llvm/utils/gn/secondary/llvm/unittests/Transforms/Instrumentation/BUILD.gn
index 27ff75b18f4315..c9c59acda22aca 100644
--- a/llvm/utils/gn/secondary/llvm/unittests/Transforms/Instrumentation/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/unittests/Transforms/Instrumentation/BUILD.gn
@@ -5,10 +5,10 @@ unittest("InstrumentationTests") {
"//llvm/lib/Analysis",
"//llvm/lib/AsmParser",
"//llvm/lib/IR",
- "//llvm/lib/Transforms/Instrumentation",
"//llvm/lib/Passes",
"//llvm/lib/Support",
"//llvm/lib/Testing/Support",
+ "//llvm/lib/Transforms/Instrumentation",
]
sources = [ "PGOInstrumentationTest.cpp" ]
}
diff --git a/llvm/utils/gn/secondary/llvm/utils/TableGen/BUILD.gn b/llvm/utils/gn/secondary/llvm/utils/TableGen/BUILD.gn
index e93250d7f0b7c4..ba52a97f39d856 100644
--- a/llvm/utils/gn/secondary/llvm/utils/TableGen/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/utils/TableGen/BUILD.gn
@@ -64,9 +64,9 @@ executable("llvm-tblgen") {
"SearchableTableEmitter.cpp",
"SubtargetEmitter.cpp",
"WebAssemblyDisassemblerEmitter.cpp",
- "X86InstrMappingEmitter.cpp",
"X86DisassemblerTables.cpp",
"X86FoldTablesEmitter.cpp",
+ "X86InstrMappingEmitter.cpp",
"X86MnemonicTables.cpp",
"X86ModRMFilters.cpp",
"X86RecognizableInstr.cpp",
More information about the llvm-commits
mailing list