BUILD 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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. # Running clang-tidy is slow, and explorer is currently feature frozen, so
  10. # don't spend time linting it.
  11. tags = ["no-clang-tidy"],
  12. deps = [
  13. ":nonnull",
  14. "@llvm-project//llvm:Support",
  15. ],
  16. )
  17. cc_test(
  18. name = "arena_test",
  19. size = "small",
  20. srcs = ["arena_test.cpp"],
  21. # Running clang-tidy is slow, and explorer is currently feature frozen, so
  22. # don't spend time linting it.
  23. tags = ["no-clang-tidy"],
  24. deps = [
  25. ":arena",
  26. "//testing/base:gtest_main",
  27. "@googletest//:gtest",
  28. ],
  29. )
  30. cc_library(
  31. name = "decompose",
  32. hdrs = ["decompose.h"],
  33. # Running clang-tidy is slow, and explorer is currently feature frozen, so
  34. # don't spend time linting it.
  35. tags = ["no-clang-tidy"],
  36. deps = [
  37. "@llvm-project//llvm:Support",
  38. ],
  39. )
  40. cc_test(
  41. name = "decompose_test",
  42. size = "small",
  43. srcs = ["decompose_test.cpp"],
  44. # Running clang-tidy is slow, and explorer is currently feature frozen, so
  45. # don't spend time linting it.
  46. tags = ["no-clang-tidy"],
  47. deps = [
  48. ":decompose",
  49. "//testing/base:gtest_main",
  50. "@googletest//:gtest",
  51. ],
  52. )
  53. cc_library(
  54. name = "error_builders",
  55. hdrs = ["error_builders.h"],
  56. # Running clang-tidy is slow, and explorer is currently feature frozen, so
  57. # don't spend time linting it.
  58. tags = ["no-clang-tidy"],
  59. deps = [
  60. ":source_location",
  61. "//common:error",
  62. ],
  63. )
  64. cc_test(
  65. name = "error_builders_test",
  66. size = "small",
  67. srcs = ["error_builders_test.cpp"],
  68. # Running clang-tidy is slow, and explorer is currently feature frozen, so
  69. # don't spend time linting it.
  70. tags = ["no-clang-tidy"],
  71. deps = [
  72. ":error_builders",
  73. ":source_location",
  74. "//common:raw_string_ostream",
  75. "//testing/base:gtest_main",
  76. "@googletest//:gtest",
  77. ],
  78. )
  79. cc_library(
  80. name = "nonnull",
  81. hdrs = ["nonnull.h"],
  82. # Running clang-tidy is slow, and explorer is currently feature frozen, so
  83. # don't spend time linting it.
  84. tags = ["no-clang-tidy"],
  85. deps = [
  86. "//common:check",
  87. ],
  88. )
  89. cc_library(
  90. name = "print_as_id",
  91. hdrs = ["print_as_id.h"],
  92. # Running clang-tidy is slow, and explorer is currently feature frozen, so
  93. # don't spend time linting it.
  94. tags = ["no-clang-tidy"],
  95. deps = [
  96. "//common:ostream",
  97. ],
  98. )
  99. cc_library(
  100. name = "source_location",
  101. hdrs = ["source_location.h"],
  102. # Running clang-tidy is slow, and explorer is currently feature frozen, so
  103. # don't spend time linting it.
  104. tags = ["no-clang-tidy"],
  105. deps = [
  106. ":nonnull",
  107. "//common:ostream",
  108. ],
  109. )
  110. cc_library(
  111. name = "trace_stream",
  112. hdrs = ["trace_stream.h"],
  113. # Running clang-tidy is slow, and explorer is currently feature frozen, so
  114. # don't spend time linting it.
  115. tags = ["no-clang-tidy"],
  116. deps = [
  117. ":source_location",
  118. "//common:check",
  119. "//common:ostream",
  120. "//explorer/base:nonnull",
  121. "@llvm-project//llvm:Support",
  122. ],
  123. )
  124. cc_test(
  125. name = "set_program_phase_raii_test",
  126. size = "small",
  127. srcs = ["set_program_phase_raii_test.cpp"],
  128. # Running clang-tidy is slow, and explorer is currently feature frozen, so
  129. # don't spend time linting it.
  130. tags = ["no-clang-tidy"],
  131. deps = [
  132. ":trace_stream",
  133. "//testing/base:gtest_main",
  134. "@googletest//:gtest",
  135. ],
  136. )
  137. cc_test(
  138. name = "set_file_context_raii_test",
  139. size = "small",
  140. srcs = ["set_file_context_raii_test.cpp"],
  141. # Running clang-tidy is slow, and explorer is currently feature frozen, so
  142. # don't spend time linting it.
  143. tags = ["no-clang-tidy"],
  144. deps = [
  145. ":source_location",
  146. ":trace_stream",
  147. "//testing/base:gtest_main",
  148. "@googletest//:gtest",
  149. ],
  150. )