BUILD 2.5 KB

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