[llvm] 5123327 - [gn build] (manually) kind of merge d627a27d26
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 14 06:24:25 PDT 2021
Author: Nico Weber
Date: 2021-03-14T09:19:44-04:00
New Revision: 5123327edab15bacb44a63a874d9d379d4873407
URL: https://github.com/llvm/llvm-project/commit/5123327edab15bacb44a63a874d9d379d4873407
DIFF: https://github.com/llvm/llvm-project/commit/5123327edab15bacb44a63a874d9d379d4873407.diff
LOG: [gn build] (manually) kind of merge d627a27d26
This only merges the no-op generator part for now.
Added:
llvm/utils/gn/secondary/clang/lib/Tooling/DumpTool/BUILD.gn
llvm/utils/gn/secondary/clang/unittests/Introspection/BUILD.gn
Modified:
llvm/utils/gn/secondary/clang/lib/Tooling/BUILD.gn
llvm/utils/gn/secondary/clang/unittests/BUILD.gn
Removed:
################################################################################
diff --git a/llvm/utils/gn/secondary/clang/lib/Tooling/BUILD.gn b/llvm/utils/gn/secondary/clang/lib/Tooling/BUILD.gn
index 5bc4241e474c..3e9cf28aa346 100644
--- a/llvm/utils/gn/secondary/clang/lib/Tooling/BUILD.gn
+++ b/llvm/utils/gn/secondary/clang/lib/Tooling/BUILD.gn
@@ -1,7 +1,19 @@
+# FIXME: The cmake build runs DumpTool:clang-ast-dump to generate a json
+# file and feeds it into this step in non-debug builds or if an option is set.
+action("node_introspection_inc") {
+ script = "DumpTool/generate_cxx_src_locs.py"
+ outputs = [ "$target_gen_dir/clang/Tooling/NodeIntrospection.inc" ]
+ args = [
+ "--empty-implementation=1",
+ "--output-file=" + rebase_path(outputs[0], root_build_dir),
+ ]
+}
+
static_library("Tooling") {
output_name = "clangTooling"
configs += [ "//llvm/utils/gn/build:clang_code" ]
deps = [
+ ":node_introspection_inc",
"//clang/include/clang/Driver:Options",
"//clang/lib/AST",
"//clang/lib/ASTMatchers",
@@ -13,6 +25,7 @@ static_library("Tooling") {
"//clang/lib/Rewrite",
"//clang/lib/Tooling/Core",
]
+ include_dirs = [ target_gen_dir ]
sources = [
"AllTUsExecution.cpp",
"ArgumentsAdjusters.cpp",
@@ -25,6 +38,7 @@ static_library("Tooling") {
"GuessTargetAndModeCompilationDatabase.cpp",
"InterpolatingCompilationDatabase.cpp",
"JSONCompilationDatabase.cpp",
+ "NodeIntrospection.cpp",
"Refactoring.cpp",
"RefactoringCallbacks.cpp",
"StandaloneExecution.cpp",
diff --git a/llvm/utils/gn/secondary/clang/lib/Tooling/DumpTool/BUILD.gn b/llvm/utils/gn/secondary/clang/lib/Tooling/DumpTool/BUILD.gn
new file mode 100644
index 000000000000..7d9d2113d459
--- /dev/null
+++ b/llvm/utils/gn/secondary/clang/lib/Tooling/DumpTool/BUILD.gn
@@ -0,0 +1,20 @@
+executable("clang-ast-dump") {
+ configs += [ "//llvm/utils/gn/build:clang_code" ]
+ deps = [
+ "//clang/lib/AST",
+ "//clang/lib/ASTMatchers",
+ "//clang/lib/Basic",
+ "//clang/lib/Driver",
+ "//clang/lib/Format",
+ "//clang/lib/Frontend",
+ "//clang/lib/Lex",
+ "//clang/lib/Rewrite",
+ "//clang/lib/Serialization",
+ "//clang/lib/Tooling/Core",
+ ]
+
+ sources = [
+ "ASTSrcLocProcessor.cpp",
+ "ClangSrcLocDump.cpp",
+ ]
+}
diff --git a/llvm/utils/gn/secondary/clang/unittests/BUILD.gn b/llvm/utils/gn/secondary/clang/unittests/BUILD.gn
index 23f5d2dfac85..1b8904c1502e 100644
--- a/llvm/utils/gn/secondary/clang/unittests/BUILD.gn
+++ b/llvm/utils/gn/secondary/clang/unittests/BUILD.gn
@@ -12,6 +12,7 @@ group("unittests") {
"Format:FormatTests",
"Frontend:FrontendTests",
"Index:IndexTests",
+ "Introspection:IntrospectionTests",
"Lex:LexTests",
"Rename:ClangRenameTests",
"Rewrite:RewriteTests",
diff --git a/llvm/utils/gn/secondary/clang/unittests/Introspection/BUILD.gn b/llvm/utils/gn/secondary/clang/unittests/Introspection/BUILD.gn
new file mode 100644
index 000000000000..d42138c68c0d
--- /dev/null
+++ b/llvm/utils/gn/secondary/clang/unittests/Introspection/BUILD.gn
@@ -0,0 +1,20 @@
+import("//llvm/utils/unittest/unittest.gni")
+
+unittest("IntrospectionTests") {
+ configs += [ "//llvm/utils/gn/build:clang_code" ]
+ deps = [
+ "//clang/lib/AST",
+ "//clang/lib/ASTMatchers",
+ "//clang/lib/Basic",
+ "//clang/lib/Frontend",
+ "//clang/lib/Serialization",
+ "//clang/lib/Tooling",
+ "//llvm/lib/Support",
+ "//llvm/lib/Testing/Support",
+ ]
+
+
+ defines = [ "SKIP_INTROSPECTION_GENERATION" ]
+
+ sources = [ "IntrospectionTest.cpp" ]
+}
More information about the llvm-commits
mailing list