BUILD 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. "//common:raw_string_ostream",
  17. "@llvm-project//clang-tools-extra/clangd:ClangDaemon",
  18. ],
  19. )
  20. cc_library(
  21. name = "context",
  22. hdrs = ["context.h"],
  23. deps = [
  24. "//common:map",
  25. ],
  26. )
  27. cc_library(
  28. name = "handle",
  29. srcs = glob(["handle_*"]),
  30. hdrs = ["handle.h"],
  31. deps = [
  32. ":context",
  33. "//toolchain/base:shared_value_stores",
  34. "//toolchain/diagnostics:null_diagnostics",
  35. "//toolchain/lex",
  36. "//toolchain/parse",
  37. "//toolchain/parse:node_kind",
  38. "//toolchain/parse:tree",
  39. "//toolchain/source:source_buffer",
  40. "@llvm-project//clang-tools-extra/clangd:ClangDaemon",
  41. ],
  42. )
  43. cc_library(
  44. name = "incoming_messages",
  45. srcs = ["incoming_messages.cpp"],
  46. hdrs = ["incoming_messages.h"],
  47. deps = [
  48. ":context",
  49. ":handle",
  50. "//common:check",
  51. "//common:map",
  52. "@llvm-project//clang-tools-extra/clangd:ClangDaemon",
  53. ],
  54. )
  55. cc_library(
  56. name = "outgoing_messages",
  57. hdrs = ["outgoing_messages.h"],
  58. deps = [
  59. "@llvm-project//clang-tools-extra/clangd:ClangDaemon",
  60. ],
  61. )