BUILD 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368
  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")
  5. package(default_visibility = ["//explorer/parse_and_execute:__pkg__"])
  6. cc_library(
  7. name = "action",
  8. srcs = [
  9. "action.cpp",
  10. ],
  11. hdrs = [
  12. "action.h",
  13. ],
  14. # Running clang-tidy is slow, and explorer is currently feature frozen, so
  15. # don't spend time linting it.
  16. tags = ["no-clang-tidy"],
  17. deps = [
  18. ":dictionary",
  19. ":heap_allocation_interface",
  20. ":stack",
  21. "//common:check",
  22. "//common:error",
  23. "//common:ostream",
  24. "//explorer/ast",
  25. "//explorer/base:arena",
  26. "//explorer/base:error_builders",
  27. "//explorer/base:nonnull",
  28. "//explorer/base:print_as_id",
  29. "//explorer/base:source_location",
  30. "@llvm-project//llvm:Support",
  31. ],
  32. )
  33. cc_library(
  34. name = "action_stack",
  35. srcs = [
  36. "action_stack.cpp",
  37. ],
  38. hdrs = [
  39. "action_stack.h",
  40. ],
  41. # Running clang-tidy is slow, and explorer is currently feature frozen, so
  42. # don't spend time linting it.
  43. tags = ["no-clang-tidy"],
  44. deps = [
  45. ":action",
  46. ":stack",
  47. "//common:check",
  48. "//common:error",
  49. "//common:ostream",
  50. "//explorer/ast",
  51. "//explorer/base:trace_stream",
  52. "@llvm-project//llvm:Support",
  53. ],
  54. )
  55. cc_library(
  56. name = "dictionary",
  57. hdrs = ["dictionary.h"],
  58. # Running clang-tidy is slow, and explorer is currently feature frozen, so
  59. # don't spend time linting it.
  60. tags = ["no-clang-tidy"],
  61. deps = ["//explorer/base:arena"],
  62. )
  63. cc_library(
  64. name = "exec_program",
  65. srcs = ["exec_program.cpp"],
  66. hdrs = ["exec_program.h"],
  67. # Running clang-tidy is slow, and explorer is currently feature frozen, so
  68. # don't spend time linting it.
  69. tags = ["no-clang-tidy"],
  70. deps = [
  71. ":interpreter",
  72. ":resolve_control_flow",
  73. ":resolve_names",
  74. ":resolve_unformed",
  75. ":type_checker",
  76. "//common:check",
  77. "//common:error",
  78. "//common:ostream",
  79. "//explorer/ast",
  80. "//explorer/base:arena",
  81. "//explorer/base:trace_stream",
  82. "@llvm-project//llvm:Support",
  83. ],
  84. )
  85. cc_library(
  86. name = "heap",
  87. srcs = ["heap.cpp"],
  88. hdrs = ["heap.h"],
  89. # Running clang-tidy is slow, and explorer is currently feature frozen, so
  90. # don't spend time linting it.
  91. tags = ["no-clang-tidy"],
  92. deps = [
  93. ":action",
  94. ":heap_allocation_interface",
  95. "//common:check",
  96. "//common:error",
  97. "//common:ostream",
  98. "//explorer/ast",
  99. "//explorer/base:error_builders",
  100. "//explorer/base:nonnull",
  101. "//explorer/base:source_location",
  102. "//explorer/base:trace_stream",
  103. "@llvm-project//llvm:Support",
  104. ],
  105. )
  106. cc_library(
  107. name = "heap_allocation_interface",
  108. hdrs = ["heap_allocation_interface.h"],
  109. # Running clang-tidy is slow, and explorer is currently feature frozen, so
  110. # don't spend time linting it.
  111. tags = ["no-clang-tidy"],
  112. deps = [
  113. "//common:error",
  114. "//explorer/ast",
  115. "//explorer/base:arena",
  116. "//explorer/base:nonnull",
  117. "//explorer/base:source_location",
  118. ],
  119. )
  120. cc_library(
  121. name = "interpreter",
  122. srcs = [
  123. "interpreter.cpp",
  124. ],
  125. hdrs = [
  126. "interpreter.h",
  127. ],
  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. ":action",
  133. ":action_stack",
  134. ":heap",
  135. ":pattern_match",
  136. ":stack",
  137. ":type_utils",
  138. "//common:check",
  139. "//common:error",
  140. "//common:ostream",
  141. "//explorer/ast",
  142. "//explorer/ast:expression_category",
  143. "//explorer/base:arena",
  144. "//explorer/base:error_builders",
  145. "//explorer/base:print_as_id",
  146. "//explorer/base:source_location",
  147. "//explorer/base:trace_stream",
  148. "@llvm-project//llvm:Support",
  149. ],
  150. )
  151. cc_library(
  152. name = "resolve_control_flow",
  153. srcs = ["resolve_control_flow.cpp"],
  154. hdrs = ["resolve_control_flow.h"],
  155. # Running clang-tidy is slow, and explorer is currently feature frozen, so
  156. # don't spend time linting it.
  157. tags = ["no-clang-tidy"],
  158. deps = [
  159. "//common:check",
  160. "//explorer/ast",
  161. "//explorer/base:error_builders",
  162. "//explorer/base:nonnull",
  163. "//explorer/base:print_as_id",
  164. "//explorer/base:trace_stream",
  165. "@llvm-project//llvm:Support",
  166. ],
  167. )
  168. cc_library(
  169. name = "resolve_names",
  170. srcs = ["resolve_names.cpp"],
  171. hdrs = ["resolve_names.h"],
  172. # Running clang-tidy is slow, and explorer is currently feature frozen, so
  173. # don't spend time linting it.
  174. tags = ["no-clang-tidy"],
  175. deps = [
  176. ":stack_space",
  177. "//common:check",
  178. "//explorer/ast",
  179. "//explorer/ast:static_scope",
  180. "//explorer/base:arena",
  181. "//explorer/base:print_as_id",
  182. "//explorer/base:trace_stream",
  183. "@llvm-project//llvm:Support",
  184. ],
  185. )
  186. cc_library(
  187. name = "stack",
  188. hdrs = ["stack.h"],
  189. # Running clang-tidy is slow, and explorer is currently feature frozen, so
  190. # don't spend time linting it.
  191. tags = ["no-clang-tidy"],
  192. deps = ["//common:check"],
  193. )
  194. cc_library(
  195. name = "pattern_analysis",
  196. srcs = [
  197. "pattern_analysis.cpp",
  198. ],
  199. hdrs = [
  200. "pattern_analysis.h",
  201. ],
  202. # Running clang-tidy is slow, and explorer is currently feature frozen, so
  203. # don't spend time linting it.
  204. tags = ["no-clang-tidy"],
  205. deps = [
  206. ":action",
  207. "//common:error",
  208. "//explorer/ast",
  209. "//explorer/base:nonnull",
  210. "@llvm-project//llvm:Support",
  211. ],
  212. )
  213. cc_library(
  214. name = "type_checker",
  215. srcs = [
  216. "builtins.cpp",
  217. "impl_scope.cpp",
  218. "matching_impl_set.cpp",
  219. "type_checker.cpp",
  220. ],
  221. hdrs = [
  222. "builtins.h",
  223. "impl_scope.h",
  224. "matching_impl_set.h",
  225. "type_checker.h",
  226. ],
  227. # Running clang-tidy is slow, and explorer is currently feature frozen, so
  228. # don't spend time linting it.
  229. tags = ["no-clang-tidy"],
  230. textual_hdrs = [
  231. "builtins.def",
  232. ],
  233. deps = [
  234. ":action",
  235. ":dictionary",
  236. ":interpreter",
  237. ":pattern_analysis",
  238. ":pattern_match",
  239. ":stack_space",
  240. ":type_structure",
  241. ":type_utils",
  242. "//common:check",
  243. "//common:enum_base",
  244. "//common:error",
  245. "//common:ostream",
  246. "//explorer/ast",
  247. "//explorer/base:arena",
  248. "//explorer/base:error_builders",
  249. "//explorer/base:nonnull",
  250. "//explorer/base:print_as_id",
  251. "//explorer/base:source_location",
  252. "//explorer/base:trace_stream",
  253. "@llvm-project//llvm:Support",
  254. ],
  255. )
  256. cc_library(
  257. name = "resolve_unformed",
  258. srcs = [
  259. "resolve_unformed.cpp",
  260. ],
  261. hdrs = [
  262. "resolve_unformed.h",
  263. ],
  264. # Running clang-tidy is slow, and explorer is currently feature frozen, so
  265. # don't spend time linting it.
  266. tags = ["no-clang-tidy"],
  267. deps = [
  268. ":stack_space",
  269. "//common:check",
  270. "//explorer/ast",
  271. "//explorer/ast:static_scope",
  272. "//explorer/base:error_builders",
  273. "//explorer/base:nonnull",
  274. "//explorer/base:print_as_id",
  275. "//explorer/base:trace_stream",
  276. "@llvm-project//llvm:Support",
  277. ],
  278. )
  279. cc_library(
  280. name = "stack_space",
  281. srcs = ["stack_space.cpp"],
  282. hdrs = ["stack_space.h"],
  283. # Running clang-tidy is slow, and explorer is currently feature frozen, so
  284. # don't spend time linting it.
  285. tags = ["no-clang-tidy"],
  286. deps = [
  287. "//common:check",
  288. "//common:error",
  289. "@llvm-project//llvm:Support",
  290. ],
  291. )
  292. cc_library(
  293. name = "type_structure",
  294. srcs = [
  295. "type_structure.cpp",
  296. ],
  297. hdrs = [
  298. "type_structure.h",
  299. ],
  300. # Running clang-tidy is slow, and explorer is currently feature frozen, so
  301. # don't spend time linting it.
  302. tags = ["no-clang-tidy"],
  303. deps = [
  304. "//common:ostream",
  305. "//explorer/ast",
  306. "//explorer/ast:expression_category",
  307. "//explorer/base:nonnull",
  308. "@llvm-project//llvm:Support",
  309. ],
  310. )
  311. cc_library(
  312. name = "type_utils",
  313. srcs = [
  314. "type_utils.cpp",
  315. ],
  316. hdrs = [
  317. "type_utils.h",
  318. ],
  319. # Running clang-tidy is slow, and explorer is currently feature frozen, so
  320. # don't spend time linting it.
  321. tags = ["no-clang-tidy"],
  322. deps = [
  323. "//explorer/ast",
  324. "//explorer/base:nonnull",
  325. "@llvm-project//llvm:Support",
  326. ],
  327. )
  328. cc_library(
  329. name = "pattern_match",
  330. srcs = [
  331. "pattern_match.cpp",
  332. ],
  333. hdrs = [
  334. "pattern_match.h",
  335. ],
  336. # Running clang-tidy is slow, and explorer is currently feature frozen, so
  337. # don't spend time linting it.
  338. tags = ["no-clang-tidy"],
  339. deps = [
  340. ":action",
  341. ":type_utils",
  342. "//explorer/ast",
  343. "//explorer/base:arena",
  344. "//explorer/base:nonnull",
  345. "//explorer/base:source_location",
  346. "//explorer/base:trace_stream",
  347. "@llvm-project//llvm:Support",
  348. ],
  349. )