1 import("//clang-tools-extra/clangd/quality/gen_decision_forest.gni")
2 import("//clang-tools-extra/clangd/xpc/enable.gni")
3 import("//llvm/utils/gn/build/write_cmake_config.gni")
5 config("features_config") {
6 # To pick up the generated inc files.
7 include_dirs = [ target_gen_dir ]
8 visibility = [ ":features" ]
11 write_cmake_config("features") {
12 input = "Features.inc.in"
13 output = "$target_gen_dir/Features.inc"
15 "CLANGD_ENABLE_REMOTE=0",
16 "CLANGD_MALLOC_TRIM=1",
17 "CLANGD_TIDY_CHECKS=1",
18 "ENABLE_GRPC_REFLECTION=0",
20 if (clangd_build_xpc) {
21 values += [ "CLANGD_BUILD_XPC=1" ]
23 values += [ "CLANGD_BUILD_XPC=0" ]
25 public_configs = [ ":features_config" ]
28 gen_decision_forest("CompletionModel") {
29 model = "quality/model"
30 filename = "CompletionModel"
31 cpp_class = "clang::clangd::Example"
32 deps = [ "//clang/lib/Sema" ]
35 static_library("clangd") {
36 output_name = "clangDaemon"
37 configs += [ "//llvm/utils/gn/build:clang_code" ]
41 "//clang-tools-extra/clang-tidy",
42 "//clang-tools-extra/clang-tidy:all-checks",
43 "//clang-tools-extra/clang-tidy:clang-tidy-config",
44 "//clang-tools-extra/clangd/support",
46 "//clang/lib/ASTMatchers",
50 "//clang/lib/Frontend",
54 "//clang/lib/Serialization",
55 "//clang/lib/Tooling",
56 "//clang/lib/Tooling/Core",
57 "//clang/lib/Tooling/Inclusions",
58 "//clang/lib/Tooling/Refactoring",
59 "//clang/lib/Tooling/Syntax",
61 "//llvm/lib/Target:AllTargetsInfos",
62 "//llvm/utils/gn/build/libs/pthread",
67 # To pick up the generated inc files.
68 "$target_gen_dir/tool",
73 "ClangdLSPServer.cpp",
76 "CodeCompletionStrings.cpp",
78 "CompileCommands.cpp",
96 "GlobalCompilationDatabase.cpp",
97 "HeaderSourceSwitch.cpp",
99 "HeuristicResolver.cpp",
101 "IncludeCleaner.cpp",
110 "QueryDriverDatabase.cpp",
113 "SemanticHighlighting.cpp",
114 "SemanticSelection.cpp",
120 "index/Background.cpp",
121 "index/BackgroundIndexLoader.cpp",
122 "index/BackgroundIndexStorage.cpp",
123 "index/BackgroundQueue.cpp",
124 "index/BackgroundRebuild.cpp",
125 "index/CanonicalIncludes.cpp",
126 "index/FileIndex.cpp",
128 "index/IndexAction.cpp",
129 "index/MemIndex.cpp",
131 "index/ProjectAware.cpp",
133 "index/Relation.cpp",
134 "index/Serialization.cpp",
136 "index/SymbolCollector.cpp",
137 "index/SymbolID.cpp",
138 "index/SymbolLocation.cpp",
139 "index/SymbolOrigin.cpp",
140 "index/YAMLSerialization.cpp",
142 "index/dex/Iterator.cpp",
143 "index/dex/PostingList.cpp",
144 "index/dex/Trigram.cpp",
145 "refactor/Rename.cpp",
146 "refactor/Tweak.cpp",