BUILD 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  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 = "timings",
  40. hdrs = ["timings.h"],
  41. deps = [
  42. ":yaml",
  43. "@llvm-project//llvm:Support",
  44. ],
  45. )
  46. cc_library(
  47. name = "value_ids",
  48. hdrs = ["value_ids.h"],
  49. deps = [
  50. ":index_base",
  51. "//common:check",
  52. "//common:ostream",
  53. "@llvm-project//llvm:Support",
  54. ],
  55. )
  56. cc_library(
  57. name = "value_store",
  58. hdrs = ["value_store.h"],
  59. deps = [
  60. ":mem_usage",
  61. ":yaml",
  62. "//common:check",
  63. "//common:hashtable_key_context",
  64. "//common:ostream",
  65. "//common:set",
  66. "@llvm-project//llvm:Support",
  67. ],
  68. )
  69. cc_test(
  70. name = "value_store_test",
  71. size = "small",
  72. srcs = ["value_store_test.cpp"],
  73. deps = [
  74. ":value_ids",
  75. ":value_store",
  76. "//common:raw_string_ostream",
  77. "//testing/base:gtest_main",
  78. "//toolchain/testing:yaml_test_helpers",
  79. "@googletest//:gtest",
  80. ],
  81. )
  82. cc_library(
  83. name = "int",
  84. srcs = ["int.cpp"],
  85. hdrs = ["int.h"],
  86. deps = [
  87. ":index_base",
  88. ":mem_usage",
  89. ":value_store",
  90. ":yaml",
  91. "//common:check",
  92. "//common:hashtable_key_context",
  93. "//common:ostream",
  94. "//common:set",
  95. "@llvm-project//llvm:Support",
  96. ],
  97. )
  98. cc_test(
  99. name = "int_test",
  100. size = "small",
  101. srcs = ["int_test.cpp"],
  102. deps = [
  103. ":int",
  104. "//common:raw_string_ostream",
  105. "//testing/base:gtest_main",
  106. "//toolchain/testing:yaml_test_helpers",
  107. "@googletest//:gtest",
  108. ],
  109. )
  110. cc_library(
  111. name = "shared_value_stores",
  112. hdrs = ["shared_value_stores.h"],
  113. deps = [
  114. ":int",
  115. ":mem_usage",
  116. ":value_ids",
  117. ":value_store",
  118. ":yaml",
  119. ],
  120. )
  121. cc_test(
  122. name = "shared_value_stores_test",
  123. size = "small",
  124. srcs = ["shared_value_stores_test.cpp"],
  125. deps = [
  126. ":shared_value_stores",
  127. "//common:raw_string_ostream",
  128. "//testing/base:gtest_main",
  129. "//toolchain/testing:yaml_test_helpers",
  130. "@googletest//:gtest",
  131. ],
  132. )
  133. cc_library(
  134. name = "yaml",
  135. hdrs = ["yaml.h"],
  136. deps = [
  137. "//common:check",
  138. "//common:ostream",
  139. "@llvm-project//llvm:Support",
  140. ],
  141. )