BUILD 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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", "cc_test")
  5. package(default_visibility = ["//visibility:public"])
  6. cc_library(
  7. name = "index_base",
  8. hdrs = ["index_base.h"],
  9. deps = [
  10. "//common:ostream",
  11. "@llvm-project//llvm:Support",
  12. ],
  13. )
  14. cc_library(
  15. name = "kind_switch",
  16. hdrs = ["kind_switch.h"],
  17. deps = [
  18. "@llvm-project//llvm:Support",
  19. ],
  20. )
  21. cc_library(
  22. name = "pretty_stack_trace_function",
  23. hdrs = ["pretty_stack_trace_function.h"],
  24. deps = [
  25. "@llvm-project//llvm:Support",
  26. ],
  27. )
  28. cc_library(
  29. name = "mem_usage",
  30. hdrs = ["mem_usage.h"],
  31. deps = [
  32. ":yaml",
  33. "//common:map",
  34. "//common:set",
  35. "@llvm-project//llvm:Support",
  36. ],
  37. )
  38. cc_library(
  39. name = "value_store",
  40. hdrs = ["value_store.h"],
  41. deps = [
  42. ":index_base",
  43. ":mem_usage",
  44. ":yaml",
  45. "//common:check",
  46. "//common:hashing",
  47. "//common:ostream",
  48. "//common:set",
  49. "@llvm-project//llvm:Support",
  50. ],
  51. )
  52. cc_test(
  53. name = "value_store_test",
  54. size = "small",
  55. srcs = ["value_store_test.cpp"],
  56. deps = [
  57. ":value_store",
  58. "//testing/base:gtest_main",
  59. "//testing/base:test_raw_ostream",
  60. "//toolchain/testing:yaml_test_helpers",
  61. "@googletest//:gtest",
  62. ],
  63. )
  64. cc_library(
  65. name = "yaml",
  66. hdrs = ["yaml.h"],
  67. deps = [
  68. "//common:check",
  69. "//common:ostream",
  70. "@llvm-project//llvm:Support",
  71. ],
  72. )