[NFC][Py Reformat] Reformat python files in llvm
[llvm-project.git] / llvm / utils / gn / secondary / clang-tools-extra / clangd / BUILD.gn
blobb64355fded628268600d659b71a80c0e08d1f942
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"
14   values = [
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",
20   ]
21   if (clangd_build_xpc) {
22     values += [ "CLANGD_BUILD_XPC=1" ]
23   } else {
24     values += [ "CLANGD_BUILD_XPC=0" ]
25   }
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" ]
39   deps = [
40     ":CompletionModel",
41     ":features",
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",
48     "//clang/lib/AST",
49     "//clang/lib/ASTMatchers",
50     "//clang/lib/Basic",
51     "//clang/lib/Driver",
52     "//clang/lib/Format",
53     "//clang/lib/Frontend",
54     "//clang/lib/Index",
55     "//clang/lib/Lex",
56     "//clang/lib/Sema",
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",
64     "//llvm/lib/Support",
65     "//llvm/lib/Target:AllTargetsInfos",
66     "//llvm/lib/TargetParser",
67     "//llvm/utils/gn/build/libs/pthread",
68   ]
69   include_dirs = [
70     ".",
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",
80   ]
81   sources = [
82     "AST.cpp",
83     "ASTSignals.cpp",
84     "ClangdLSPServer.cpp",
85     "ClangdServer.cpp",
86     "CodeComplete.cpp",
87     "CodeCompletionStrings.cpp",
88     "CollectMacros.cpp",
89     "CompileCommands.cpp",
90     "Compiler.cpp",
91     "Config.cpp",
92     "ConfigCompile.cpp",
93     "ConfigProvider.cpp",
94     "ConfigYAML.cpp",
95     "DecisionForest.cpp",
96     "Diagnostics.cpp",
97     "DraftStore.cpp",
98     "DumpAST.cpp",
99     "ExpectedTypes.cpp",
100     "FS.cpp",
101     "Feature.cpp",
102     "FeatureModule.cpp",
103     "FileDistance.cpp",
104     "FindSymbols.cpp",
105     "FindTarget.cpp",
106     "Format.cpp",
107     "FuzzyMatch.cpp",
108     "GlobalCompilationDatabase.cpp",
109     "HeaderSourceSwitch.cpp",
110     "Headers.cpp",
111     "HeuristicResolver.cpp",
112     "Hover.cpp",
113     "IncludeCleaner.cpp",
114     "IncludeFixer.cpp",
115     "InlayHints.cpp",
116     "JSONTransport.cpp",
117     "ParsedAST.cpp",
118     "PathMapping.cpp",
119     "Preamble.cpp",
120     "Protocol.cpp",
121     "Quality.cpp",
122     "RIFF.cpp",
123     "Selection.cpp",
124     "SemanticHighlighting.cpp",
125     "SemanticSelection.cpp",
126     "SourceCode.cpp",
127     "SystemIncludeExtractor.cpp",
128     "TUScheduler.cpp",
129     "TidyProvider.cpp",
130     "URI.cpp",
131     "XRefs.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",
139     "index/Index.cpp",
140     "index/IndexAction.cpp",
141     "index/MemIndex.cpp",
142     "index/Merge.cpp",
143     "index/ProjectAware.cpp",
144     "index/Ref.cpp",
145     "index/Relation.cpp",
146     "index/Serialization.cpp",
147     "index/StdLib.cpp",
148     "index/Symbol.cpp",
149     "index/SymbolCollector.cpp",
150     "index/SymbolID.cpp",
151     "index/SymbolLocation.cpp",
152     "index/SymbolOrigin.cpp",
153     "index/YAMLSerialization.cpp",
154     "index/dex/Dex.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",
161   ]