diff --git a/llvm/utils/gn/secondary/clang-tools-extra/clangd/BUILD.gn b/llvm/utils/gn/secondary/clang-tools-extra/clangd/BUILD.gn --- 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 @@ 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 --- 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 @@ 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 @@ "//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") }