BUILD 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. # Exceptions. See /LICENSE for license information.
  3. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. load("@rules_cc//cc:defs.bzl", "cc_library")
  5. package(default_visibility = ["//visibility:public"])
  6. cc_library(
  7. name = "language_server",
  8. srcs = ["language_server.cpp"],
  9. hdrs = ["language_server.h"],
  10. deps = [
  11. ":context",
  12. ":incoming_messages",
  13. ":outgoing_messages",
  14. "//common:error",
  15. "//common:ostream",
  16. "@llvm-project//clang-tools-extra/clangd:ClangDaemon",
  17. ],
  18. )
  19. cc_library(
  20. name = "context",
  21. hdrs = ["context.h"],
  22. deps = [
  23. "//common:map",
  24. ],
  25. )
  26. cc_library(
  27. name = "handle",
  28. srcs = glob(["handle_*"]),
  29. hdrs = ["handle.h"],
  30. deps = [
  31. ":context",
  32. "//toolchain/base:shared_value_stores",
  33. "//toolchain/diagnostics:null_diagnostics",
  34. "//toolchain/lex",
  35. "//toolchain/parse",
  36. "//toolchain/parse:node_kind",
  37. "//toolchain/parse:tree",
  38. "//toolchain/source:source_buffer",
  39. "@llvm-project//clang-tools-extra/clangd:ClangDaemon",
  40. ],
  41. )
  42. cc_library(
  43. name = "incoming_messages",
  44. srcs = ["incoming_messages.cpp"],
  45. hdrs = ["incoming_messages.h"],
  46. deps = [
  47. ":context",
  48. ":handle",
  49. "//common:check",
  50. "//common:map",
  51. "@llvm-project//clang-tools-extra/clangd:ClangDaemon",
  52. ],
  53. )
  54. cc_library(
  55. name = "outgoing_messages",
  56. hdrs = ["outgoing_messages.h"],
  57. deps = [
  58. "@llvm-project//clang-tools-extra/clangd:ClangDaemon",
  59. ],
  60. )