BUILD 2.4 KB

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