[llvm] af3c51e - [gn build] Add missing clangd dependencies
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 22 09:04:42 PDT 2020
Author: Arthur Eubanks
Date: 2020-10-22T09:04:30-07:00
New Revision: af3c51e3546eccff714ec146fb8daf18177e2028
URL: https://github.com/llvm/llvm-project/commit/af3c51e3546eccff714ec146fb8daf18177e2028
DIFF: https://github.com/llvm/llvm-project/commit/af3c51e3546eccff714ec146fb8daf18177e2028.diff
LOG: [gn build] Add missing clangd dependencies
Fixes
$ ninja obj/build/rel/gen/clang-tools-extra/clangd/CompletionModel.CompletionModel.obj
Some tablegen include files from clang/include/clang/AST and
clang/include/clang/Sema need to be generated before CompletionModel is
compiled.
Reviewed By: thakis
Differential Revision: https://reviews.llvm.org/D89657
Added:
Modified:
llvm/utils/gn/secondary/clang-tools-extra/clangd/BUILD.gn
llvm/utils/gn/secondary/clang-tools-extra/clangd/quality/gen_decision_forest.gni
Removed:
################################################################################
diff --git a/llvm/utils/gn/secondary/clang-tools-extra/clangd/BUILD.gn b/llvm/utils/gn/secondary/clang-tools-extra/clangd/BUILD.gn
index 20309f35d85a..3b03275ff9a5 100644
--- a/llvm/utils/gn/secondary/clang-tools-extra/clangd/BUILD.gn
+++ b/llvm/utils/gn/secondary/clang-tools-extra/clangd/BUILD.gn
@@ -25,6 +25,7 @@ gen_decision_forest("CompletionModel") {
model = "quality/model"
filename = "CompletionModel"
cpp_class = "clang::clangd::Example"
+ deps = [ "//clang/lib/Sema" ]
}
static_library("clangd") {
diff --git a/llvm/utils/gn/secondary/clang-tools-extra/clangd/quality/gen_decision_forest.gni b/llvm/utils/gn/secondary/clang-tools-extra/clangd/quality/gen_decision_forest.gni
index a75c1f343563..b286b0b1cd5d 100644
--- a/llvm/utils/gn/secondary/clang-tools-extra/clangd/quality/gen_decision_forest.gni
+++ b/llvm/utils/gn/secondary/clang-tools-extra/clangd/quality/gen_decision_forest.gni
@@ -2,6 +2,11 @@ template("gen_decision_forest") {
model = invoker.model
filename = invoker.filename
cpp_class = invoker.cpp_class
+ if (defined(invoker.deps)) {
+ extra_deps = invoker.deps
+ } else {
+ extra_deps = []
+ }
action("${target_name}Cpp") {
script = "//clang-tools-extra/clangd/quality/CompletionModelCodegen.py"
@@ -34,7 +39,7 @@ template("gen_decision_forest") {
"//llvm/utils/gn/build:clang_code",
":${target_name}Config",
]
- deps = [ ":${target_name}Cpp" ]
+ deps = [ ":${target_name}Cpp" ] + extra_deps
include_dirs = [ "." ]
sources = get_target_outputs(":${target_name}Cpp")
}
More information about the llvm-commits
mailing list