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_DECISION_FOREST=1",
16 "CLANGD_ENABLE_REMOTE=0",
17 "CLANGD_MALLOC_TRIM=1",
18 "CLANGD_TIDY_CHECKS=1",
19 "ENABLE_GRPC_REFLECTION=0",
21 if (clangd_build_xpc) {
22 values += [ "CLANGD_BUILD_XPC=1" ]
24 values += [ "CLANGD_BUILD_XPC=0" ]
26 public_configs = [ ":features_config" ]
29 gen_decision_forest("CompletionModel") {
30 model = "quality/model"
31 filename = "CompletionModel"
32 cpp_class = "clang::clangd::Example"
33 deps = [ "//clang/lib/Sema" ]
36 static_library("clangd") {
37 output_name = "clangDaemon"
38 configs += [ "//llvm/utils/gn/build:clang_code" ]
42 "//clang-tools-extra/clang-tidy",
43 "//clang-tools-extra/clang-tidy:all-checks",
44 "//clang-tools-extra/clang-tidy:clang-tidy-config",
45 "//clang-tools-extra/clangd/support",
46 "//clang-tools-extra/include-cleaner/lib",
47 "//clang-tools-extra/pseudo/lib",
49 "//clang/lib/ASTMatchers",
53 "//clang/lib/Frontend",
57 "//clang/lib/Serialization",
58 "//clang/lib/Tooling",
59 "//clang/lib/Tooling/Core",
60 "//clang/lib/Tooling/Inclusions",
61 "//clang/lib/Tooling/Inclusions/Stdlib",
62 "//clang/lib/Tooling/Refactoring",
63 "//clang/lib/Tooling/Syntax",
65 "//llvm/lib/Target:AllTargetsInfos",
66 "//llvm/lib/TargetParser",
67 "//llvm/utils/gn/build/libs/pthread",
72 # For "clang-include-cleaner/..." includes.
73 "//clang-tools-extra/include-cleaner/include",
75 # For "clang-pseudo/..." includes.
76 "//clang-tools-extra/pseudo/include",
78 # To pick up the generated inc files.
79 "$target_gen_dir/tool",
84 "ClangdLSPServer.cpp",
87 "CodeCompletionStrings.cpp",
89 "CompileCommands.cpp",
108 "GlobalCompilationDatabase.cpp",
109 "HeaderSourceSwitch.cpp",
111 "HeuristicResolver.cpp",
113 "IncludeCleaner.cpp",
124 "SemanticHighlighting.cpp",
125 "SemanticSelection.cpp",
127 "SystemIncludeExtractor.cpp",
132 "index/Background.cpp",
133 "index/BackgroundIndexLoader.cpp",
134 "index/BackgroundIndexStorage.cpp",
135 "index/BackgroundQueue.cpp",
136 "index/BackgroundRebuild.cpp",
137 "index/CanonicalIncludes.cpp",
138 "index/FileIndex.cpp",
140 "index/IndexAction.cpp",
141 "index/MemIndex.cpp",
143 "index/ProjectAware.cpp",
145 "index/Relation.cpp",
146 "index/Serialization.cpp",
149 "index/SymbolCollector.cpp",
150 "index/SymbolID.cpp",
151 "index/SymbolLocation.cpp",
152 "index/SymbolOrigin.cpp",
153 "index/YAMLSerialization.cpp",
155 "index/dex/Iterator.cpp",
156 "index/dex/PostingList.cpp",
157 "index/dex/Trigram.cpp",
158 "refactor/InsertionPoint.cpp",
159 "refactor/Rename.cpp",
160 "refactor/Tweak.cpp",