diff --git a/utils/gn/secondary/clang-tools-extra/clangd/BUILD.gn b/utils/gn/secondary/clang-tools-extra/clangd/BUILD.gn index e1723e482d6..b25dec1c14c 100644 --- a/utils/gn/secondary/clang-tools-extra/clangd/BUILD.gn +++ b/utils/gn/secondary/clang-tools-extra/clangd/BUILD.gn @@ -19,6 +19,7 @@ static_library("clangd") { "//clang-tools-extra/clang-tidy/portability", "//clang-tools-extra/clang-tidy/readability", "//clang-tools-extra/clang-tidy/zircon", + "//clang-tools-extra/clangd/tool:features", "//clang/lib/AST", "//clang/lib/ASTMatchers", "//clang/lib/Basic", @@ -37,7 +38,12 @@ static_library("clangd") { "//llvm/utils/gn/build/libs/atomic", "//llvm/utils/gn/build/libs/pthread", ] - include_dirs = [ "." ] + include_dirs = [ + ".", + + # To pick up the generated inc files. + "$target_gen_dir/tool", + ] sources = [ "AST.cpp", "Cancellation.cpp", diff --git a/utils/gn/secondary/clang-tools-extra/clangd/tool/BUILD.gn b/utils/gn/secondary/clang-tools-extra/clangd/tool/BUILD.gn index 9fe6b278624..c59356b6cb3 100644 --- a/utils/gn/secondary/clang-tools-extra/clangd/tool/BUILD.gn +++ b/utils/gn/secondary/clang-tools-extra/clangd/tool/BUILD.gn @@ -13,6 +13,7 @@ write_cmake_config("features") { } } + executable("clangd") { configs += [ "//llvm/utils/gn/build:clang_code" ] deps = [ diff --git a/utils/gn/secondary/clang-tools-extra/unittests/clangd/BUILD.gn b/utils/gn/secondary/clang-tools-extra/unittests/clangd/BUILD.gn index a2f38664a7f..2a173501a01 100644 --- a/utils/gn/secondary/clang-tools-extra/unittests/clangd/BUILD.gn +++ b/utils/gn/secondary/clang-tools-extra/unittests/clangd/BUILD.gn @@ -20,7 +20,12 @@ unittest("ClangdTests") { "//llvm/lib/Support", "//llvm/lib/Testing/Support", ] - include_dirs = [ "//clang-tools-extra/clangd" ] + include_dirs = [ + "//clang-tools-extra/clangd", + + # To pick up the generated inc files. + "$target_gen_dir/../../clangd/tool", + ] sources = [ "Annotations.cpp", "BackgroundIndexTests.cpp",