[gn build] Make sync_source_lists_from_cmake handle one-line sources lines

sync_source_lists_from_cmake now also looks for source files in
`sources += [ "foo.cc" ]` lines, which allows us to remove most
`# Make `gn format` not collapse this` comments.

(sync_source_lists_from_cmake doesn't look for `foo_headers += [...]`
still, so the comment is still needed in two places for that.)

No intentional behavior change.
This commit is contained in:
Nico Weber
2020-07-17 11:51:08 -04:00
parent acbc688263
commit 1afd889d0b
185 changed files with 200 additions and 775 deletions

View File

@@ -20,7 +20,9 @@ set(LIBCXXABI_SOURCES
)
if (LIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS)
list(APPEND LIBCXXABI_SOURCES stdlib_new_delete.cpp)
list(APPEND LIBCXXABI_SOURCES
stdlib_new_delete.cpp
)
endif()
if (LIBCXXABI_ENABLE_EXCEPTIONS)

View File

@@ -59,6 +59,10 @@ def sync_source_lists(write):
# Matches e.g. | "foo.cpp",|, captures |foo| in group 1.
gn_cpp_re = re.compile(r'^\s*"([^"]+\.(?:cpp|c|h|S))",$', re.MULTILINE)
# Matches e.g. | bar_sources = [ "foo.cpp" ]|, captures |foo| in group 1.
gn_cpp_re2 = re.compile(
r'^\s*(?:.*_)?sources \+?= \[ "([^"]+\.(?:cpp|c|h|S))" ]$',
re.MULTILINE)
# Matches e.g. | foo.cpp|, captures |foo| in group 1.
cmake_cpp_re = re.compile(r'^\s*([A-Za-z_0-9./-]+\.(?:cpp|c|h|S))$',
re.MULTILINE)
@@ -88,6 +92,7 @@ def sync_source_lists(write):
def get_sources(source_re, text):
return set([m.group(1) for m in source_re.finditer(text)])
gn_cpp = get_sources(gn_cpp_re, open(gn_file).read())
gn_cpp |= get_sources(gn_cpp_re2, open(gn_file).read())
cmake_cpp = get_sources(cmake_cpp_re, open(cmake_file).read())
if gn_cpp == cmake_cpp:

View File

@@ -10,8 +10,5 @@ static_library("clang-apply-replacements") {
"//llvm/lib/Support",
]
include_dirs = [ "include" ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"lib/Tooling/ApplyReplacements.cpp",
]
sources = [ "lib/Tooling/ApplyReplacements.cpp" ]
}

View File

@@ -10,8 +10,5 @@ executable("clang-apply-replacements") {
"//llvm/lib/Support",
]
include_dirs = [ "../include" ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"ClangApplyReplacementsMain.cpp",
]
sources = [ "ClangApplyReplacementsMain.cpp" ]
}

View File

@@ -13,8 +13,5 @@ static_library("clang-change-namespace") {
"//clang/lib/Tooling/Core",
"//llvm/lib/Support",
]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"ChangeNamespace.cpp",
]
sources = [ "ChangeNamespace.cpp" ]
}

View File

@@ -13,8 +13,5 @@ executable("clang-change-namespace") {
"//clang/lib/Tooling/Core",
]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"ClangChangeNamespace.cpp",
]
sources = [ "ClangChangeNamespace.cpp" ]
}

View File

@@ -10,8 +10,5 @@ executable("clang-doc") {
"//clang/lib/Tooling/Core",
]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"ClangDocMain.cpp",
]
sources = [ "ClangDocMain.cpp" ]
}

View File

@@ -11,8 +11,5 @@ executable("find-all-symbols") {
"//clang/lib/Tooling",
]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"FindAllSymbolsMain.cpp",
]
sources = [ "FindAllSymbolsMain.cpp" ]
}

View File

@@ -12,8 +12,5 @@ static_library("plugin") {
"//llvm/utils/gn/build/libs/pthread",
]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"IncludeFixerPlugin.cpp",
]
sources = [ "IncludeFixerPlugin.cpp" ]
}

View File

@@ -12,8 +12,5 @@ executable("clang-include-fixer") {
"//clang/lib/Tooling/Core",
]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"ClangIncludeFixer.cpp",
]
sources = [ "ClangIncludeFixer.cpp" ]
}

View File

@@ -13,8 +13,5 @@ executable("clang-move") {
"//clang/lib/Tooling/Core",
]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"ClangMove.cpp",
]
sources = [ "ClangMove.cpp" ]
}

View File

@@ -11,8 +11,5 @@ executable("clang-query") {
"//clang/lib/Tooling",
]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"ClangQuery.cpp",
]
sources = [ "ClangQuery.cpp" ]
}

View File

@@ -11,8 +11,5 @@ static_library("clang-reorder-fields") {
"//clang/lib/Tooling/Core",
"//llvm/lib/Support",
]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"ReorderFieldsAction.cpp",
]
sources = [ "ReorderFieldsAction.cpp" ]
}

View File

@@ -9,8 +9,5 @@ executable("clang-reorder-fields") {
"//clang/lib/Tooling",
"//clang/lib/Tooling/Core",
]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"ClangReorderFields.cpp",
]
sources = [ "ClangReorderFields.cpp" ]
}

View File

@@ -12,8 +12,5 @@ static_library("plugin") {
"//clang/lib/Tooling",
]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"ClangTidyPlugin.cpp",
]
sources = [ "ClangTidyPlugin.cpp" ]
}

View File

@@ -14,7 +14,6 @@ executable("clang-tidy") {
"//llvm/lib/Target:AllTargetsInfos",
]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"ClangTidyMain.cpp",
"ClangTidyToolMain.cpp",
]

View File

@@ -9,8 +9,5 @@ executable("dexp") {
"//llvm/lib/Support",
]
include_dirs = [ "../../.." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"Dexp.cpp",
]
sources = [ "Dexp.cpp" ]
}

View File

@@ -8,9 +8,6 @@ source_set("remote") {
include_dirs = [ "../.." ]
sources = []
if (false) {
sources += [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"Client.cpp",
]
sources += [ "Client.cpp" ]
}
}

View File

@@ -6,8 +6,5 @@ source_set("unimplemented") {
"//llvm/lib/Support",
]
include_dirs = [ "../../.." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"UnimplementedClient.cpp",
]
sources = [ "UnimplementedClient.cpp" ]
}

View File

@@ -11,8 +11,5 @@ executable("clangd-indexer") {
"//llvm/lib/Support",
]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"IndexerMain.cpp",
]
sources = [ "IndexerMain.cpp" ]
}

View File

@@ -25,8 +25,5 @@ executable("clangd") {
}
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"ClangdMain.cpp",
]
sources = [ "ClangdMain.cpp" ]
}

View File

@@ -9,8 +9,5 @@ unittest("ClangdXpcTests") {
"//llvm/lib/Testing/Support",
]
include_dirs = [ "//clang-tools-extra/clangd" ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"ConversionTests.cpp",
]
sources = [ "ConversionTests.cpp" ]
}

View File

@@ -7,10 +7,7 @@ static_library("conversions") {
"//llvm/lib/Support",
]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"Conversion.cpp",
]
sources = [ "Conversion.cpp" ]
}
static_library("transport") {
@@ -23,8 +20,5 @@ static_library("transport") {
"//llvm/lib/Support",
]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"XPCTransport.cpp",
]
sources = [ "XPCTransport.cpp" ]
}

View File

@@ -63,10 +63,7 @@ bundle_data("clangdxpc_bundle_info_plist") {
shared_library("ClangdXPCLib") {
deps = [ "//clang-tools-extra/clangd/tool:clangd" ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"ClangdXPC.cpp",
]
sources = [ "ClangdXPC.cpp" ]
}
bundle_data("clangdxpc_bundle_executable") {

View File

@@ -14,8 +14,5 @@ executable("clangd-xpc-test-client") {
]
include_dirs = [ "../.." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"ClangdXPCTestClient.cpp",
]
sources = [ "ClangdXPCTestClient.cpp" ]
}

View File

@@ -9,8 +9,5 @@ unittest("ClangApplyReplacementsTests") {
"//clang/lib/Tooling/Refactoring",
]
include_dirs = [ "//clang-tools-extra/clang-apply-replacements/include" ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"ApplyReplacementsTest.cpp",
]
sources = [ "ApplyReplacementsTest.cpp" ]
}

View File

@@ -21,8 +21,5 @@ unittest("ClangChangeNamespaceTests") {
# We'd like clang/unittests/Tooling/RewriterTestContext.h in the test.
"//clang",
]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"ChangeNamespaceTests.cpp",
]
sources = [ "ChangeNamespaceTests.cpp" ]
}

View File

@@ -14,8 +14,5 @@ unittest("FindAllSymbolsTests") {
"//llvm/lib/Support",
]
include_dirs = [ "//clang-tools-extra/clang-include-fixer/find-all-symbols" ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"FindAllSymbolsTests.cpp",
]
sources = [ "FindAllSymbolsTests.cpp" ]
}

View File

@@ -21,8 +21,5 @@ unittest("ClangMoveTests") {
# We'd like clang/unittests/Tooling/RewriterTestContext.h in the test.
"//clang",
]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"ClangMoveTests.cpp",
]
sources = [ "ClangMoveTests.cpp" ]
}

View File

@@ -8,8 +8,5 @@ static_library("CrossTU") {
"//clang/lib/Index",
"//llvm/lib/Support",
]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"CrossTranslationUnit.cpp",
]
sources = [ "CrossTranslationUnit.cpp" ]
}

View File

@@ -23,8 +23,5 @@ static_library("FrontendTool") {
if (clang_enable_static_analyzer) {
deps += [ "//clang/lib/StaticAnalyzer/Frontend" ]
}
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"ExecuteCompilerInvocation.cpp",
]
sources = [ "ExecuteCompilerInvocation.cpp" ]
}

View File

@@ -4,8 +4,5 @@ static_library("Testing") {
deps = [
"//llvm/lib/Support",
]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"CommandLineArgs.cpp",
]
sources = [ "CommandLineArgs.cpp" ]
}

View File

@@ -7,8 +7,5 @@ static_library("ASTDiff") {
"//clang/lib/Lex",
"//llvm/lib/Support",
]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"ASTDiff.cpp",
]
sources = [ "ASTDiff.cpp" ]
}

View File

@@ -7,8 +7,5 @@ executable("arcmt-test") {
"//clang/lib/Lex",
"//llvm/lib/Support",
]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"arcmt-test.cpp",
]
sources = [ "arcmt-test.cpp" ]
}

View File

@@ -1,10 +1,7 @@
executable("c-arcmt-test") {
configs += [ "//llvm/utils/gn/build:clang_code" ]
deps = [ "//clang/tools/libclang" ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"c-arcmt-test.c",
]
sources = [ "c-arcmt-test.c" ]
# See comment at top of clang/tools/libclang/BUILD.gn for why this isn't
# needed on Linux.

View File

@@ -12,8 +12,5 @@ executable("clang-check") {
"//llvm/lib/Support",
"//llvm/lib/Target:TargetsToBuild",
]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"ClangCheck.cpp",
]
sources = [ "ClangCheck.cpp" ]
}

View File

@@ -7,8 +7,5 @@ executable("clang-diff") {
"//clang/lib/Tooling/ASTDiff",
"//llvm/lib/Support",
]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"ClangDiff.cpp",
]
sources = [ "ClangDiff.cpp" ]
}

View File

@@ -11,8 +11,5 @@ executable("clang-extdef-mapping") {
"//llvm/lib/MC",
"//llvm/lib/Support",
]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"ClangExtDefMapGen.cpp",
]
sources = [ "ClangExtDefMapGen.cpp" ]
}

View File

@@ -8,8 +8,5 @@ executable("clang-format") {
"//clang/lib/Tooling/Core",
"//llvm/lib/Support",
]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"ClangFormat.cpp",
]
sources = [ "ClangFormat.cpp" ]
}

View File

@@ -11,8 +11,5 @@ executable("clang-import-test") {
"//llvm/lib/IR",
"//llvm/lib/Support",
]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"clang-import-test.cpp",
]
sources = [ "clang-import-test.cpp" ]
}

View File

@@ -7,8 +7,5 @@ executable("clang-offload-bundler") {
"//llvm/lib/Object",
"//llvm/lib/Support",
]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"ClangOffloadBundler.cpp",
]
sources = [ "ClangOffloadBundler.cpp" ]
}

View File

@@ -7,8 +7,5 @@ executable("clang-offload-wrapper") {
"//llvm/lib/Support",
"//llvm/lib/Transforms/Utils",
]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"ClangOffloadWrapper.cpp",
]
sources = [ "ClangOffloadWrapper.cpp" ]
}

View File

@@ -10,8 +10,5 @@ executable("clang-rename") {
"//llvm/lib/Option",
"//llvm/lib/Support",
]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"ClangRename.cpp",
]
sources = [ "ClangRename.cpp" ]
}

View File

@@ -15,8 +15,5 @@ executable("clang-scan-deps") {
"//llvm/lib/IR",
"//llvm/lib/Support",
]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"ClangScanDeps.cpp",
]
sources = [ "ClangScanDeps.cpp" ]
}

View File

@@ -11,8 +11,5 @@ unittest("CrossTUTests") {
"//llvm/lib/Support",
"//llvm/lib/Target:TargetsToBuild",
]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"CrossTranslationUnitTest.cpp",
]
sources = [ "CrossTranslationUnitTest.cpp" ]
}

View File

@@ -12,8 +12,5 @@ unittest("IndexTests") {
"//clang/lib/Tooling",
"//llvm/lib/Support",
]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"IndexTests.cpp",
]
sources = [ "IndexTests.cpp" ]
}

View File

@@ -11,8 +11,5 @@ unittest("SerializationTests") {
"//llvm/lib/Bitcode/Reader",
"//llvm/lib/Support",
]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"InMemoryModuleCacheTest.cpp",
]
sources = [ "InMemoryModuleCacheTest.cpp" ]
}

View File

@@ -3,10 +3,7 @@ import("//llvm/utils/unittest/unittest.gni")
unittest("libclangTests") {
configs += [ "//llvm/utils/gn/build:clang_code" ]
deps = [ "//clang/tools/libclang" ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"LibclangTest.cpp",
]
sources = [ "LibclangTest.cpp" ]
if (host_os == "mac") {
ldflags = [ "-Wl,-rpath," + rebase_path("$root_out_dir/lib") ]
}

View File

@@ -3,10 +3,7 @@ import("//llvm/utils/unittest/unittest.gni")
unittest("libclangCrashTests") {
configs += [ "//llvm/utils/gn/build:clang_code" ]
deps = [ "//clang/tools/libclang" ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"LibclangCrashTest.cpp",
]
sources = [ "LibclangCrashTest.cpp" ]
if (host_os == "mac") {
ldflags = [ "-Wl,-rpath," + rebase_path("$root_out_dir/lib") ]
}

View File

@@ -3,10 +3,7 @@ import("//compiler-rt/target.gni")
source_set("cxx_sources") {
configs -= [ "//llvm/utils/gn/build:llvm_code" ]
configs += [ "//llvm/utils/gn/build:crt_code" ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"asan_new_delete.cpp",
]
sources = [ "asan_new_delete.cpp" ]
}
if (current_os == "mac") {
@@ -103,10 +100,7 @@ target(asan_target_type, "asan") {
"asan_win.cpp",
]
if (target_os != "mac" && target_os != "win") {
sources += [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"asan_interceptors_vfork.S",
]
sources += [ "asan_interceptors_vfork.S" ]
}
# To be able to include sanitizer_common.

View File

@@ -173,10 +173,7 @@ static_library("builtins") {
}
if (current_os != "fuchsia" && !compiler_rt_baremetal_build) {
sources += [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"clear_cache.c",
]
sources += [ "clear_cache.c" ]
}
if (current_os == "mac") {
@@ -423,16 +420,9 @@ static_library("builtins") {
}
if (current_cpu == "arm64") {
sources += [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"aarch64/fp_mode.c",
]
sources += [ "aarch64/fp_mode.c" ]
if (current_os == "mingw") {
sources += [
# Make `gn format` not collapse this, for
# sync_source_lists_from_cmake.py.
"aarch64/chkstk.S",
]
sources += [ "aarch64/chkstk.S" ]
}
}
@@ -486,11 +476,7 @@ static_library("builtins") {
}
if (current_cpu == "riscv") {
sources += [
# This comment prevents `gn format` from putting the file on the same line
# as `sources +=`, for sync_source_lists_from_cmake.py.
"riscv/mulsi3.S",
]
sources += [ "riscv/mulsi3.S" ]
}
if (current_cpu == "ve") {
@@ -501,11 +487,7 @@ static_library("builtins") {
}
if (!compiler_rt_exclude_atomic_builtin) {
sources += [
# This comment prevents `gn format` from putting the file on the same line
# as `sources +=`, for sync_source_lists_from_cmake.py.
"atomic.c",
]
sources += [ "atomic.c" ]
}
}

View File

@@ -3,10 +3,7 @@ import("//clang/resource_dir.gni")
source_set("sources") {
configs -= [ "//llvm/utils/gn/build:llvm_code" ]
configs += [ "//llvm/utils/gn/build:crt_code" ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"cfi.cpp",
]
sources = [ "cfi.cpp" ]
}
copy("blacklist") {

View File

@@ -70,10 +70,7 @@ source_set("cxx_sources") {
configs -= [ "//llvm/utils/gn/build:llvm_code" ]
configs += [ "//llvm/utils/gn/build:crt_code" ]
deps = [ "//compiler-rt/lib/ubsan:cxx_sources" ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"hwasan_new_delete.cpp",
]
sources = [ "hwasan_new_delete.cpp" ]
}
static_library("hwasan") {

View File

@@ -170,8 +170,5 @@ source_set("nolibc_sources") {
configs -= [ "//llvm/utils/gn/build:llvm_code" ]
configs += [ "//llvm/utils/gn/build:crt_code" ]
deps = [ "//llvm/utils/gn/build/libs/pthread" ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"sanitizer_common_nolibc.cpp",
]
sources = [ "sanitizer_common_nolibc.cpp" ]
}

View File

@@ -67,10 +67,7 @@ source_set("c_wrapper_sources") {
configs -= [ "//llvm/utils/gn/build:llvm_code" ]
configs += [ "//llvm/utils/gn/build:crt_code" ]
cflags = scudo_cflags
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"wrappers_c.cpp",
]
sources = [ "wrappers_c.cpp" ]
public_configs = [ ":scudo_config" ]
}
@@ -79,10 +76,7 @@ source_set("cxx_wrapper_sources") {
configs -= [ "//llvm/utils/gn/build:llvm_code" ]
configs += [ "//llvm/utils/gn/build:crt_code" ]
cflags = scudo_cflags
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"wrappers_cpp.cpp",
]
sources = [ "wrappers_cpp.cpp" ]
public_configs = [ ":scudo_config" ]
}

View File

@@ -1,9 +1,6 @@
executable("ScudoBenchmarks") {
configs += [ "//llvm/utils/gn/build:crt_code" ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"malloc_benchmark.cpp",
]
sources = [ "malloc_benchmark.cpp" ]
deps = [
"//compiler-rt/lib/scudo/standalone:sources",
"//llvm/utils/benchmark",

View File

@@ -167,10 +167,7 @@ if (target_os == "win") {
]
}
if (target_os == "solaris") {
cxx_sources += [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"support/solaris/xlocale.cpp",
]
cxx_sources += [ "support/solaris/xlocale.cpp" ]
}
if (libcxx_enable_filesystem) {
cxx_sources += [
@@ -179,10 +176,7 @@ if (libcxx_enable_filesystem) {
"filesystem/operations.cpp",
]
if (libcxx_use_compiler_rt) {
cxx_sources += [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"filesystem/int128_builtins.cpp",
]
cxx_sources += [ "filesystem/int128_builtins.cpp" ]
}
}
@@ -268,10 +262,7 @@ if (libcxx_enable_experimental) {
static_library("cxx_experimental") {
output_dir = runtimes_dir
output_name = "c++experimental"
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"experimental/memory_resource.cpp",
]
sources = [ "experimental/memory_resource.cpp" ]
configs += [ ":cxx_config" ]
configs -= [
"//llvm/utils/gn/build:no_exceptions",

View File

@@ -52,16 +52,10 @@ if (libcxxabi_enable_exceptions) {
"cxa_personality.cpp",
]
} else {
cxxabi_sources += [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"cxa_noexception.cpp",
]
cxxabi_sources += [ "cxa_noexception.cpp" ]
}
if (target_os == "linux" || target_os == "fuchsia") {
cxxabi_sources += [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"cxa_thread_atexit.cpp",
]
cxxabi_sources += [ "cxa_thread_atexit.cpp" ]
}
config("cxxabi_config") {

View File

@@ -44,10 +44,7 @@ unwind_sources = [
"libunwind_ext.h",
]
if (target_os == "mac") {
unwind_sources += [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"Unwind_AppleExtras.cpp",
]
unwind_sources += [ "Unwind_AppleExtras.cpp" ]
}
config("unwind_config") {

View File

@@ -15,8 +15,5 @@ static_library("MinGW") {
"//llvm/lib/Option",
"//llvm/lib/Support",
]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"Driver.cpp",
]
sources = [ "Driver.cpp" ]
}

View File

@@ -18,8 +18,5 @@ static_library("Driver") {
"//llvm/lib/Option",
"//llvm/lib/Support",
]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"DarwinLdDriver.cpp",
]
sources = [ "DarwinLdDriver.cpp" ]
}

View File

@@ -6,10 +6,7 @@ static_library("ReaderWriter") {
"//llvm/lib/Object",
"//llvm/lib/Support",
]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"FileArchive.cpp",
]
sources = [ "FileArchive.cpp" ]
# FIXME:
# if (is_msvc) {

View File

@@ -5,8 +5,5 @@ static_library("YAML") {
"//lld/lib/Core",
"//llvm/lib/Support",
]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"ReaderWriterYAML.cpp",
]
sources = [ "ReaderWriterYAML.cpp" ]
}

View File

@@ -33,8 +33,5 @@ executable("lld") {
"//lld/wasm",
"//llvm/lib/Support",
]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"lld.cpp",
]
sources = [ "lld.cpp" ]
}

View File

@@ -6,8 +6,5 @@ unittest("DriverTests") {
"//lld/lib/Driver",
"//lld/lib/ReaderWriter/MachO",
]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"DarwinLdDriverTest.cpp",
]
sources = [ "DarwinLdDriverTest.cpp" ]
}

View File

@@ -2,8 +2,5 @@ static_library("Reader") {
output_name = "LLVMBitstreamReader"
deps = [ "//llvm/lib/Support" ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"BitstreamReader.cpp",
]
sources = [ "BitstreamReader.cpp" ]
}

View File

@@ -8,8 +8,5 @@ static_library("MCJIT") {
"//llvm/lib/Support",
"//llvm/lib/Target",
]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"MCJIT.cpp",
]
sources = [ "MCJIT.cpp" ]
}

View File

@@ -1,7 +1,4 @@
static_library("Extensions") {
output_name = "LLVMExtensions"
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"Extensions.cpp",
]
sources = [ "Extensions.cpp" ]
}

View File

@@ -6,8 +6,5 @@ static_library("IRReader") {
"//llvm/lib/IR",
"//llvm/lib/Support",
]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"IRReader.cpp",
]
sources = [ "IRReader.cpp" ]
}

View File

@@ -6,8 +6,5 @@ static_library("LineEditor") {
"//llvm/utils/gn/build/libs/edit",
]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"LineEditor.cpp",
]
sources = [ "LineEditor.cpp" ]
}

View File

@@ -21,8 +21,5 @@ static_library("AsmParser") {
"//llvm/lib/Target/AArch64/Utils",
]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"AArch64AsmParser.cpp",
]
sources = [ "AArch64AsmParser.cpp" ]
}

View File

@@ -2,8 +2,5 @@ static_library("TargetInfo") {
output_name = "LLVMAArch64Info"
deps = [ "//llvm/lib/Support" ]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"AArch64TargetInfo.cpp",
]
sources = [ "AArch64TargetInfo.cpp" ]
}

View File

@@ -20,8 +20,5 @@ static_library("Utils") {
# AArch64BaseInfo.h includes a header from MCTargetDesc :-/
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"AArch64BaseInfo.cpp",
]
sources = [ "AArch64BaseInfo.cpp" ]
}

View File

@@ -18,8 +18,5 @@ static_library("AsmParser") {
"//llvm/lib/Target/AMDGPU/Utils",
]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"AMDGPUAsmParser.cpp",
]
sources = [ "AMDGPUAsmParser.cpp" ]
}

View File

@@ -18,8 +18,5 @@ static_library("Disassembler") {
"//llvm/lib/Target/AMDGPU/Utils",
]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"AMDGPUDisassembler.cpp",
]
sources = [ "AMDGPUDisassembler.cpp" ]
}

View File

@@ -2,8 +2,5 @@ static_library("TargetInfo") {
output_name = "LLVMAMDGPUInfo"
deps = [ "//llvm/lib/Support" ]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"AMDGPUTargetInfo.cpp",
]
sources = [ "AMDGPUTargetInfo.cpp" ]
}

View File

@@ -18,8 +18,5 @@ static_library("AsmParser") {
"//llvm/lib/Target/ARM/Utils",
]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"ARMAsmParser.cpp",
]
sources = [ "ARMAsmParser.cpp" ]
}

View File

@@ -17,8 +17,5 @@ static_library("Disassembler") {
"//llvm/lib/Target/ARM/Utils",
]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"ARMDisassembler.cpp",
]
sources = [ "ARMDisassembler.cpp" ]
}

View File

@@ -2,8 +2,5 @@ static_library("TargetInfo") {
output_name = "LLVMARMInfo"
deps = [ "//llvm/lib/Support" ]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"ARMTargetInfo.cpp",
]
sources = [ "ARMTargetInfo.cpp" ]
}

View File

@@ -21,8 +21,5 @@ static_library("Utils") {
# ARMBaseInfo.h includes a header from MCTargetDesc,
# https://reviews.llvm.org/D35209#1075113 :-/
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"ARMBaseInfo.cpp",
]
sources = [ "ARMBaseInfo.cpp" ]
}

View File

@@ -17,8 +17,5 @@ static_library("AsmParser") {
"//llvm/lib/Target/AVR/TargetInfo",
]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"AVRAsmParser.cpp",
]
sources = [ "AVRAsmParser.cpp" ]
}

View File

@@ -17,8 +17,5 @@ static_library("Disassembler") {
"//llvm/lib/Target/AVR/TargetInfo",
]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"AVRDisassembler.cpp",
]
sources = [ "AVRDisassembler.cpp" ]
}

View File

@@ -2,8 +2,5 @@ static_library("TargetInfo") {
output_name = "LLVMAVRInfo"
deps = [ "//llvm/lib/Support" ]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"AVRTargetInfo.cpp",
]
sources = [ "AVRTargetInfo.cpp" ]
}

View File

@@ -17,8 +17,5 @@ static_library("AsmParser") {
"//llvm/lib/Target/BPF/TargetInfo",
]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"BPFAsmParser.cpp",
]
sources = [ "BPFAsmParser.cpp" ]
}

View File

@@ -16,8 +16,5 @@ static_library("Disassembler") {
"//llvm/lib/Target/BPF/MCTargetDesc",
]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"BPFDisassembler.cpp",
]
sources = [ "BPFDisassembler.cpp" ]
}

View File

@@ -2,8 +2,5 @@ static_library("TargetInfo") {
output_name = "LLVMBPFInfo"
deps = [ "//llvm/lib/Support" ]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"BPFTargetInfo.cpp",
]
sources = [ "BPFTargetInfo.cpp" ]
}

View File

@@ -16,8 +16,5 @@ static_library("AsmParser") {
"//llvm/lib/Target/Hexagon/MCTargetDesc",
]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"HexagonAsmParser.cpp",
]
sources = [ "HexagonAsmParser.cpp" ]
}

View File

@@ -16,8 +16,5 @@ static_library("Disassembler") {
"//llvm/lib/Target/Hexagon/TargetInfo",
]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"HexagonDisassembler.cpp",
]
sources = [ "HexagonDisassembler.cpp" ]
}

View File

@@ -2,8 +2,5 @@ static_library("TargetInfo") {
output_name = "LLVMHexagonInfo"
deps = [ "//llvm/lib/Support" ]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"HexagonTargetInfo.cpp",
]
sources = [ "HexagonTargetInfo.cpp" ]
}

View File

@@ -16,8 +16,5 @@ static_library("AsmParser") {
"//llvm/lib/Target/Lanai/MCTargetDesc",
]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"LanaiAsmParser.cpp",
]
sources = [ "LanaiAsmParser.cpp" ]
}

View File

@@ -16,8 +16,5 @@ static_library("Disassembler") {
"//llvm/lib/Target/Lanai/TargetInfo",
]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"LanaiDisassembler.cpp",
]
sources = [ "LanaiDisassembler.cpp" ]
}

View File

@@ -2,8 +2,5 @@ static_library("TargetInfo") {
output_name = "LLVMLanaiInfo"
deps = [ "//llvm/lib/Support" ]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"LanaiTargetInfo.cpp",
]
sources = [ "LanaiTargetInfo.cpp" ]
}

View File

@@ -17,8 +17,5 @@ static_library("AsmParser") {
"//llvm/lib/Target/Mips/TargetInfo",
]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"MipsAsmParser.cpp",
]
sources = [ "MipsAsmParser.cpp" ]
}

View File

@@ -16,8 +16,5 @@ static_library("Disassembler") {
"//llvm/lib/Target/Mips/TargetInfo",
]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"MipsDisassembler.cpp",
]
sources = [ "MipsDisassembler.cpp" ]
}

View File

@@ -2,8 +2,5 @@ static_library("TargetInfo") {
output_name = "LLVMMipsInfo"
deps = [ "//llvm/lib/Support" ]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"MipsTargetInfo.cpp",
]
sources = [ "MipsTargetInfo.cpp" ]
}

View File

@@ -2,8 +2,5 @@ static_library("TargetInfo") {
output_name = "LLVMNVPTXInfo"
deps = [ "//llvm/lib/Support" ]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"NVPTXTargetInfo.cpp",
]
sources = [ "NVPTXTargetInfo.cpp" ]
}

View File

@@ -17,8 +17,5 @@ static_library("AsmParser") {
"//llvm/lib/Target/PowerPC/TargetInfo",
]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"PPCAsmParser.cpp",
]
sources = [ "PPCAsmParser.cpp" ]
}

View File

@@ -16,8 +16,5 @@ static_library("Disassembler") {
"//llvm/lib/Target/PowerPC/TargetInfo",
]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"PPCDisassembler.cpp",
]
sources = [ "PPCDisassembler.cpp" ]
}

View File

@@ -2,8 +2,5 @@ static_library("TargetInfo") {
output_name = "LLVMPowerPCInfo"
deps = [ "//llvm/lib/Support" ]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"PowerPCTargetInfo.cpp",
]
sources = [ "PowerPCTargetInfo.cpp" ]
}

View File

@@ -21,8 +21,5 @@ static_library("AsmParser") {
"//llvm/lib/Target/RISCV/Utils",
]
include_dirs = [ ".." ]
sources = [
# Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
"RISCVAsmParser.cpp",
]
sources = [ "RISCVAsmParser.cpp" ]
}

Some files were not shown because too many files have changed in this diff Show More