blob: b5251472a397bda52caef7a2d7732290c7b8ea32 [file] [log] [blame]
Austin Engcc2516a2023-10-17 20:57:54 +00001# Copyright 2023 The Dawn & Tint Authors
Ben Clayton65625552023-09-11 18:33:43 +00002#
Austin Engcc2516a2023-10-17 20:57:54 +00003# Redistribution and use in source and binary forms, with or without
4# modification, are permitted provided that the following conditions are met:
Ben Clayton65625552023-09-11 18:33:43 +00005#
Austin Engcc2516a2023-10-17 20:57:54 +00006# 1. Redistributions of source code must retain the above copyright notice, this
7# list of conditions and the following disclaimer.
Ben Clayton65625552023-09-11 18:33:43 +00008#
Austin Engcc2516a2023-10-17 20:57:54 +00009# 2. Redistributions in binary form must reproduce the above copyright notice,
10# this list of conditions and the following disclaimer in the documentation
11# and/or other materials provided with the distribution.
12#
13# 3. Neither the name of the copyright holder nor the names of its
14# contributors may be used to endorse or promote products derived from
15# this software without specific prior written permission.
16#
17# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Ben Clayton65625552023-09-11 18:33:43 +000027
28################################################################################
29# File generated by 'tools/src/cmd/gen' using the template:
30# tools/src/cmd/gen/build/BUILD.bazel.tmpl
31#
32# To regenerate run: './tools/run gen'
33#
34# Do not modify this file directly
35################################################################################
36
37load("//src/tint:flags.bzl", "COPTS")
38load("@bazel_skylib//lib:selects.bzl", "selects")
39cc_library(
40 name = "ir",
41 srcs = [
42 "access.cc",
43 "binary.cc",
44 "bitcast.cc",
45 "block.cc",
46 "block_param.cc",
47 "break_if.cc",
48 "builder.cc",
49 "builtin_call.cc",
50 "call.cc",
dan sinclair16cb4bd2023-09-21 08:52:11 +000051 "clone_context.cc",
Ben Clayton65625552023-09-11 18:33:43 +000052 "constant.cc",
53 "construct.cc",
54 "continue.cc",
55 "control_instruction.cc",
56 "convert.cc",
Ben Clayton514a18a2024-01-09 10:44:27 +000057 "core_binary.cc",
Ben Clayton65625552023-09-11 18:33:43 +000058 "core_builtin_call.cc",
Ben Claytonb865a1e2024-01-08 13:01:50 +000059 "core_unary.cc",
dan sinclair650bc3e2024-06-11 23:26:53 +000060 "disassembler.cc",
Ben Clayton65625552023-09-11 18:33:43 +000061 "discard.cc",
62 "exit.cc",
63 "exit_if.cc",
64 "exit_loop.cc",
65 "exit_switch.cc",
66 "function.cc",
67 "function_param.cc",
68 "if.cc",
69 "instruction.cc",
70 "instruction_result.cc",
Ben Clayton65625552023-09-11 18:33:43 +000071 "let.cc",
72 "load.cc",
73 "load_vector_element.cc",
74 "loop.cc",
James Pricec34ca5f2024-06-11 18:24:06 +000075 "member_builtin_call.cc",
Ben Clayton65625552023-09-11 18:33:43 +000076 "module.cc",
77 "multi_in_block.cc",
78 "next_iteration.cc",
79 "operand_instruction.cc",
80 "return.cc",
81 "store.cc",
82 "store_vector_element.cc",
83 "switch.cc",
84 "swizzle.cc",
85 "terminate_invocation.cc",
86 "terminator.cc",
87 "unary.cc",
88 "unreachable.cc",
Ryan Harrison71f1b392024-08-08 13:27:46 +000089 "unused.cc",
Ben Clayton65625552023-09-11 18:33:43 +000090 "user_call.cc",
91 "validator.cc",
92 "value.cc",
93 "var.cc",
94 ],
95 hdrs = [
96 "access.h",
97 "binary.h",
98 "bitcast.h",
99 "block.h",
100 "block_param.h",
101 "break_if.h",
102 "builder.h",
103 "builtin_call.h",
104 "call.h",
dan sinclair16cb4bd2023-09-21 08:52:11 +0000105 "clone_context.h",
Ben Clayton65625552023-09-11 18:33:43 +0000106 "constant.h",
107 "construct.h",
108 "continue.h",
109 "control_instruction.h",
110 "convert.h",
Ben Clayton514a18a2024-01-09 10:44:27 +0000111 "core_binary.h",
Ben Clayton65625552023-09-11 18:33:43 +0000112 "core_builtin_call.h",
Ben Claytonb865a1e2024-01-08 13:01:50 +0000113 "core_unary.h",
dan sinclair650bc3e2024-06-11 23:26:53 +0000114 "disassembler.h",
Ben Clayton65625552023-09-11 18:33:43 +0000115 "discard.h",
116 "exit.h",
117 "exit_if.h",
118 "exit_loop.h",
119 "exit_switch.h",
120 "function.h",
121 "function_param.h",
dan sinclair019146f2023-11-20 23:47:42 +0000122 "ice.h",
Ben Clayton65625552023-09-11 18:33:43 +0000123 "if.h",
124 "instruction.h",
125 "instruction_result.h",
Ben Clayton65625552023-09-11 18:33:43 +0000126 "let.h",
127 "load.h",
128 "load_vector_element.h",
Ben Clayton65625552023-09-11 18:33:43 +0000129 "loop.h",
James Pricec34ca5f2024-06-11 18:24:06 +0000130 "member_builtin_call.h",
Ben Clayton65625552023-09-11 18:33:43 +0000131 "module.h",
132 "multi_in_block.h",
133 "next_iteration.h",
134 "operand_instruction.h",
135 "return.h",
136 "store.h",
137 "store_vector_element.h",
138 "switch.h",
139 "swizzle.h",
140 "terminate_invocation.h",
141 "terminator.h",
Ben Clayton9860d3d2023-09-26 07:12:46 +0000142 "traverse.h",
Ben Clayton65625552023-09-11 18:33:43 +0000143 "unary.h",
144 "unreachable.h",
Ryan Harrison71f1b392024-08-08 13:27:46 +0000145 "unused.h",
Ben Clayton65625552023-09-11 18:33:43 +0000146 "user_call.h",
147 "validator.h",
148 "value.h",
149 "var.h",
150 ],
151 deps = [
152 "//src/tint/api/common",
153 "//src/tint/lang/core",
154 "//src/tint/lang/core/constant",
155 "//src/tint/lang/core/intrinsic",
Ben Clayton65625552023-09-11 18:33:43 +0000156 "//src/tint/lang/core/type",
157 "//src/tint/utils/containers",
158 "//src/tint/utils/diagnostic",
159 "//src/tint/utils/ice",
160 "//src/tint/utils/id",
161 "//src/tint/utils/macros",
162 "//src/tint/utils/math",
163 "//src/tint/utils/memory",
164 "//src/tint/utils/reflection",
165 "//src/tint/utils/result",
166 "//src/tint/utils/rtti",
167 "//src/tint/utils/symbol",
168 "//src/tint/utils/text",
169 "//src/tint/utils/traits",
dan sinclaird90557b2024-08-28 16:15:03 +0000170 "//src/utils",
Ben Clayton65625552023-09-11 18:33:43 +0000171 ],
172 copts = COPTS,
173 visibility = ["//visibility:public"],
174)
175cc_library(
176 name = "test",
177 alwayslink = True,
178 srcs = [
179 "access_test.cc",
Ben Clayton65625552023-09-11 18:33:43 +0000180 "bitcast_test.cc",
181 "block_param_test.cc",
182 "block_test.cc",
183 "break_if_test.cc",
James Price7ee30f52024-08-21 01:40:04 +0000184 "builder_test.cc",
Ben Clayton65625552023-09-11 18:33:43 +0000185 "constant_test.cc",
186 "construct_test.cc",
187 "continue_test.cc",
188 "convert_test.cc",
Ben Clayton514a18a2024-01-09 10:44:27 +0000189 "core_binary_test.cc",
Ben Clayton65625552023-09-11 18:33:43 +0000190 "core_builtin_call_test.cc",
Ben Claytonb865a1e2024-01-08 13:01:50 +0000191 "core_unary_test.cc",
Ben Clayton65625552023-09-11 18:33:43 +0000192 "discard_test.cc",
193 "exit_if_test.cc",
194 "exit_loop_test.cc",
195 "exit_switch_test.cc",
196 "function_param_test.cc",
197 "function_test.cc",
198 "if_test.cc",
199 "instruction_result_test.cc",
200 "instruction_test.cc",
201 "ir_helper_test.h",
202 "let_test.cc",
203 "load_test.cc",
204 "load_vector_element_test.cc",
205 "loop_test.cc",
206 "module_test.cc",
207 "multi_in_block_test.cc",
208 "next_iteration_test.cc",
209 "operand_instruction_test.cc",
210 "return_test.cc",
211 "store_test.cc",
212 "store_vector_element_test.cc",
213 "switch_test.cc",
214 "swizzle_test.cc",
dan sinclair16cb4bd2023-09-21 08:52:11 +0000215 "terminate_invocation_test.cc",
Ben Clayton9860d3d2023-09-26 07:12:46 +0000216 "traverse_test.cc",
dan sinclair16cb4bd2023-09-21 08:52:11 +0000217 "unreachable_test.cc",
Ben Clayton65625552023-09-11 18:33:43 +0000218 "user_call_test.cc",
219 "validator_test.cc",
220 "value_test.cc",
221 "var_test.cc",
222 ],
223 deps = [
224 "//src/tint/api/common",
225 "//src/tint/lang/core",
226 "//src/tint/lang/core/constant",
227 "//src/tint/lang/core/intrinsic",
Ben Clayton65625552023-09-11 18:33:43 +0000228 "//src/tint/lang/core/ir",
229 "//src/tint/lang/core/type",
230 "//src/tint/utils/containers",
231 "//src/tint/utils/diagnostic",
232 "//src/tint/utils/ice",
233 "//src/tint/utils/id",
234 "//src/tint/utils/macros",
235 "//src/tint/utils/math",
236 "//src/tint/utils/memory",
237 "//src/tint/utils/reflection",
238 "//src/tint/utils/result",
239 "//src/tint/utils/rtti",
240 "//src/tint/utils/symbol",
241 "//src/tint/utils/text",
242 "//src/tint/utils/traits",
243 "@gtest",
dan sinclaird90557b2024-08-28 16:15:03 +0000244 "//src/utils",
Ben Clayton65625552023-09-11 18:33:43 +0000245 ],
246 copts = COPTS,
247 visibility = ["//visibility:public"],
248)
James Price3576e1e2024-08-27 22:35:00 +0000249cc_library(
250 name = "bench",
251 alwayslink = True,
252 srcs = [
253 "validator_bench.cc",
254 ],
255 deps = [
256 "//src/tint/api/common",
257 "//src/tint/lang/core",
258 "//src/tint/lang/core/constant",
259 "//src/tint/lang/core/ir",
260 "//src/tint/lang/core/type",
261 "//src/tint/lang/wgsl",
262 "//src/tint/lang/wgsl/ast",
263 "//src/tint/lang/wgsl/common",
264 "//src/tint/lang/wgsl/features",
265 "//src/tint/lang/wgsl/program",
266 "//src/tint/lang/wgsl/sem",
267 "//src/tint/utils/containers",
268 "//src/tint/utils/diagnostic",
269 "//src/tint/utils/ice",
270 "//src/tint/utils/id",
271 "//src/tint/utils/macros",
272 "//src/tint/utils/math",
273 "//src/tint/utils/memory",
274 "//src/tint/utils/reflection",
275 "//src/tint/utils/result",
276 "//src/tint/utils/rtti",
277 "//src/tint/utils/symbol",
278 "//src/tint/utils/text",
279 "//src/tint/utils/traits",
280 "@benchmark",
dan sinclaird90557b2024-08-28 16:15:03 +0000281 "//src/utils",
James Price3576e1e2024-08-27 22:35:00 +0000282 ] + select({
283 ":tint_build_wgsl_reader": [
284 "//src/tint/cmd/bench:bench",
285 "//src/tint/lang/wgsl/reader",
286 ],
287 "//conditions:default": [],
288 }),
289 copts = COPTS,
290 visibility = ["//visibility:public"],
291)
292
293alias(
294 name = "tint_build_wgsl_reader",
295 actual = "//src/tint:tint_build_wgsl_reader_true",
296)
Ben Clayton65625552023-09-11 18:33:43 +0000297