BUILD 1.8 KB

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