Skip to content

Commit bff8755

Browse files
authored
[bazel] Add clangd as a library support (#81556)
Creates a `BUILD.bazel` file for the `clangd` directory in the project overlay. This upstreams the patch that allows https://github.com/carbon-language/carbon-lang/tree/trunk/language_server to use `clangd` as a library. This was created as part of a Summer of Code project building a prototype Carbon language server. If this is not an appropriate architecture, I'm very open to alternative paths forward. Thanks!
1 parent 4292086 commit bff8755

File tree

1 file changed

+49
-0
lines changed
  • utils/bazel/llvm-project-overlay/clang-tools-extra/clangd

1 file changed

+49
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# This file is licensed under the Apache License v2.0 with LLVM Exceptions.
2+
# See https://llvm.org/LICENSE.txt for license information.
3+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4+
5+
package(default_visibility = ["//visibility:public"],
6+
features = ["layering_check"])
7+
8+
licenses(["notice"])
9+
10+
# TODO: Pick up other files for more complete functionality, to match
11+
# clangd/CMakeLists.txt. This might look something like
12+
# glob(["*.cpp", "dir/**/*.cpp", ...]).
13+
cc_library(
14+
name = "ClangDaemon",
15+
srcs = [
16+
"JSONTransport.cpp",
17+
"Protocol.cpp",
18+
"URI.cpp",
19+
"index/SymbolID.cpp",
20+
"support/Logger.cpp",
21+
"support/Trace.cpp",
22+
"support/MemoryTree.cpp",
23+
"support/Context.cpp",
24+
"support/Cancellation.cpp",
25+
"support/ThreadCrashReporter.cpp",
26+
"support/Shutdown.cpp",
27+
],
28+
hdrs = [
29+
"Transport.h",
30+
"Protocol.h",
31+
"URI.h",
32+
"LSPBinder.h",
33+
"index/SymbolID.h",
34+
"support/Function.h",
35+
"support/Cancellation.h",
36+
"support/ThreadCrashReporter.h",
37+
"support/Logger.h",
38+
"support/Trace.h",
39+
"support/MemoryTree.h",
40+
"support/Context.h",
41+
"support/Shutdown.h",
42+
],
43+
includes = ["."],
44+
deps = [
45+
"//llvm:Support",
46+
"//clang:basic",
47+
"//clang:index",
48+
],
49+
)

0 commit comments

Comments
 (0)