BUILD 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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. package(default_visibility = ["//explorer:__subpackages__"])
  5. cc_library(
  6. name = "arena",
  7. hdrs = ["arena.h"],
  8. deps = [
  9. ":nonnull",
  10. "@llvm-project//llvm:Support",
  11. ],
  12. )
  13. cc_test(
  14. name = "arena_test",
  15. srcs = ["arena_test.cpp"],
  16. deps = [
  17. ":arena",
  18. "//testing/base:gtest_main",
  19. "@com_google_googletest//:gtest",
  20. ],
  21. )
  22. cc_library(
  23. name = "decompose",
  24. hdrs = ["decompose.h"],
  25. deps = [
  26. "@llvm-project//llvm:Support",
  27. ],
  28. )
  29. cc_test(
  30. name = "decompose_test",
  31. srcs = ["decompose_test.cpp"],
  32. deps = [
  33. ":decompose",
  34. "//testing/base:gtest_main",
  35. "@com_google_googletest//:gtest",
  36. ],
  37. )
  38. cc_library(
  39. name = "error_builders",
  40. hdrs = ["error_builders.h"],
  41. deps = [
  42. ":source_location",
  43. "//common:error",
  44. ],
  45. )
  46. cc_test(
  47. name = "error_builders_test",
  48. srcs = ["error_builders_test.cpp"],
  49. deps = [
  50. ":error_builders",
  51. ":source_location",
  52. "//testing/base:gtest_main",
  53. "//testing/base:test_raw_ostream",
  54. "@com_google_googletest//:gtest",
  55. ],
  56. )
  57. cc_library(
  58. name = "nonnull",
  59. hdrs = ["nonnull.h"],
  60. deps = [
  61. "//common:check",
  62. ],
  63. )
  64. cc_library(
  65. name = "source_location",
  66. hdrs = ["source_location.h"],
  67. deps = [
  68. ":nonnull",
  69. "//common:ostream",
  70. ],
  71. )
  72. cc_library(
  73. name = "trace_stream",
  74. hdrs = ["trace_stream.h"],
  75. deps = [
  76. ":source_location",
  77. "//common:check",
  78. "//common:ostream",
  79. "//explorer/base:nonnull",
  80. "@llvm-project//llvm:Support",
  81. ],
  82. )
  83. cc_test(
  84. name = "set_program_phase_raii_test",
  85. srcs = ["set_program_phase_raii_test.cpp"],
  86. deps = [
  87. ":trace_stream",
  88. "//testing/base:gtest_main",
  89. "@com_google_googletest//:gtest",
  90. ],
  91. )
  92. cc_test(
  93. name = "set_file_context_raii_test",
  94. srcs = ["set_file_context_raii_test.cpp"],
  95. deps = [
  96. ":source_location",
  97. ":trace_stream",
  98. "//testing/base:gtest_main",
  99. "@com_google_googletest//:gtest",
  100. ],
  101. )