blob: c59356b6cb3499d76989b1211f394717f136f40d [file] [log] [blame]
import("//clang-tools-extra/clangd/xpc/enable.gni")
import("//llvm/utils/gn/build/write_cmake_config.gni")
write_cmake_config("features") {
# FIXME: Try moving Features.inc.in to tools, seems like a better location.
input = "../Features.inc.in"
output = "$target_gen_dir/Features.inc"
values = []
if (clangd_build_xpc) {
values += [ "CLANGD_BUILD_XPC=1" ]
} else {
values += [ "CLANGD_BUILD_XPC=0" ]
}
}
executable("clangd") {
configs += [ "//llvm/utils/gn/build:clang_code" ]
deps = [
":features",
"//clang-tools-extra/clang-tidy",
"//clang-tools-extra/clangd",
"//clang-tools-extra/clangd/refactor/tweaks",
"//clang/lib/AST",
"//clang/lib/Basic",
"//clang/lib/Format",
"//clang/lib/Frontend",
"//clang/lib/Sema",
"//clang/lib/Tooling",
"//clang/lib/Tooling/Core",
"//llvm/lib/Support",
]
if (clangd_build_xpc) {
deps += [
"//clang-tools-extra/clangd/xpc:conversions",
"//clang-tools-extra/clangd/xpc:transport",
]
}
include_dirs = [
"..",
# To pick up the generated inc files.
"$target_gen_dir",
]
sources = [
"ClangdMain.cpp",
]
}