Skip to content

Commit 5123327

Browse files
committed
[gn build] (manually) kind of merge d627a27
This only merges the no-op generator part for now.
1 parent 2b3c813 commit 5123327

File tree

4 files changed

+55
-0
lines changed

4 files changed

+55
-0
lines changed

llvm/utils/gn/secondary/clang/lib/Tooling/BUILD.gn

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
1+
# FIXME: The cmake build runs DumpTool:clang-ast-dump to generate a json
2+
# file and feeds it into this step in non-debug builds or if an option is set.
3+
action("node_introspection_inc") {
4+
script = "DumpTool/generate_cxx_src_locs.py"
5+
outputs = [ "$target_gen_dir/clang/Tooling/NodeIntrospection.inc" ]
6+
args = [
7+
"--empty-implementation=1",
8+
"--output-file=" + rebase_path(outputs[0], root_build_dir),
9+
]
10+
}
11+
112
static_library("Tooling") {
213
output_name = "clangTooling"
314
configs += [ "//llvm/utils/gn/build:clang_code" ]
415
deps = [
16+
":node_introspection_inc",
517
"//clang/include/clang/Driver:Options",
618
"//clang/lib/AST",
719
"//clang/lib/ASTMatchers",
@@ -13,6 +25,7 @@ static_library("Tooling") {
1325
"//clang/lib/Rewrite",
1426
"//clang/lib/Tooling/Core",
1527
]
28+
include_dirs = [ target_gen_dir ]
1629
sources = [
1730
"AllTUsExecution.cpp",
1831
"ArgumentsAdjusters.cpp",
@@ -25,6 +38,7 @@ static_library("Tooling") {
2538
"GuessTargetAndModeCompilationDatabase.cpp",
2639
"InterpolatingCompilationDatabase.cpp",
2740
"JSONCompilationDatabase.cpp",
41+
"NodeIntrospection.cpp",
2842
"Refactoring.cpp",
2943
"RefactoringCallbacks.cpp",
3044
"StandaloneExecution.cpp",
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
executable("clang-ast-dump") {
2+
configs += [ "//llvm/utils/gn/build:clang_code" ]
3+
deps = [
4+
"//clang/lib/AST",
5+
"//clang/lib/ASTMatchers",
6+
"//clang/lib/Basic",
7+
"//clang/lib/Driver",
8+
"//clang/lib/Format",
9+
"//clang/lib/Frontend",
10+
"//clang/lib/Lex",
11+
"//clang/lib/Rewrite",
12+
"//clang/lib/Serialization",
13+
"//clang/lib/Tooling/Core",
14+
]
15+
16+
sources = [
17+
"ASTSrcLocProcessor.cpp",
18+
"ClangSrcLocDump.cpp",
19+
]
20+
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ group("unittests") {
1212
"Format:FormatTests",
1313
"Frontend:FrontendTests",
1414
"Index:IndexTests",
15+
"Introspection:IntrospectionTests",
1516
"Lex:LexTests",
1617
"Rename:ClangRenameTests",
1718
"Rewrite:RewriteTests",
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import("//llvm/utils/unittest/unittest.gni")
2+
3+
unittest("IntrospectionTests") {
4+
configs += [ "//llvm/utils/gn/build:clang_code" ]
5+
deps = [
6+
"//clang/lib/AST",
7+
"//clang/lib/ASTMatchers",
8+
"//clang/lib/Basic",
9+
"//clang/lib/Frontend",
10+
"//clang/lib/Serialization",
11+
"//clang/lib/Tooling",
12+
"//llvm/lib/Support",
13+
"//llvm/lib/Testing/Support",
14+
]
15+
16+
17+
defines = [ "SKIP_INTROSPECTION_GENERATION" ]
18+
19+
sources = [ "IntrospectionTest.cpp" ]
20+
}

0 commit comments

Comments
 (0)