Austin Eng | cc2516a | 2023-10-17 20:57:54 +0000 | [diff] [blame] | 1 | # Copyright 2023 The Dawn & Tint Authors |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 2 | # |
Austin Eng | cc2516a | 2023-10-17 20:57:54 +0000 | [diff] [blame] | 3 | # Redistribution and use in source and binary forms, with or without |
| 4 | # modification, are permitted provided that the following conditions are met: |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 5 | # |
Austin Eng | cc2516a | 2023-10-17 20:57:54 +0000 | [diff] [blame] | 6 | # 1. Redistributions of source code must retain the above copyright notice, this |
| 7 | # list of conditions and the following disclaimer. |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 8 | # |
Austin Eng | cc2516a | 2023-10-17 20:57:54 +0000 | [diff] [blame] | 9 | # 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 Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 27 | |
| 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 | |
| 37 | load("//src/tint:flags.bzl", "COPTS") |
| 38 | load("@bazel_skylib//lib:selects.bzl", "selects") |
| 39 | cc_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 sinclair | 16cb4bd | 2023-09-21 08:52:11 +0000 | [diff] [blame] | 51 | "clone_context.cc", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 52 | "constant.cc", |
| 53 | "construct.cc", |
| 54 | "continue.cc", |
| 55 | "control_instruction.cc", |
| 56 | "convert.cc", |
Ben Clayton | 514a18a | 2024-01-09 10:44:27 +0000 | [diff] [blame] | 57 | "core_binary.cc", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 58 | "core_builtin_call.cc", |
Ben Clayton | b865a1e | 2024-01-08 13:01:50 +0000 | [diff] [blame] | 59 | "core_unary.cc", |
dan sinclair | 650bc3e | 2024-06-11 23:26:53 +0000 | [diff] [blame] | 60 | "disassembler.cc", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 61 | "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 Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 71 | "let.cc", |
| 72 | "load.cc", |
| 73 | "load_vector_element.cc", |
| 74 | "loop.cc", |
James Price | c34ca5f | 2024-06-11 18:24:06 +0000 | [diff] [blame] | 75 | "member_builtin_call.cc", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 76 | "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 Harrison | 71f1b39 | 2024-08-08 13:27:46 +0000 | [diff] [blame] | 89 | "unused.cc", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 90 | "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 sinclair | 16cb4bd | 2023-09-21 08:52:11 +0000 | [diff] [blame] | 105 | "clone_context.h", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 106 | "constant.h", |
| 107 | "construct.h", |
| 108 | "continue.h", |
| 109 | "control_instruction.h", |
| 110 | "convert.h", |
Ben Clayton | 514a18a | 2024-01-09 10:44:27 +0000 | [diff] [blame] | 111 | "core_binary.h", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 112 | "core_builtin_call.h", |
Ben Clayton | b865a1e | 2024-01-08 13:01:50 +0000 | [diff] [blame] | 113 | "core_unary.h", |
dan sinclair | 650bc3e | 2024-06-11 23:26:53 +0000 | [diff] [blame] | 114 | "disassembler.h", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 115 | "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 sinclair | 019146f | 2023-11-20 23:47:42 +0000 | [diff] [blame] | 122 | "ice.h", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 123 | "if.h", |
| 124 | "instruction.h", |
| 125 | "instruction_result.h", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 126 | "let.h", |
| 127 | "load.h", |
| 128 | "load_vector_element.h", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 129 | "loop.h", |
James Price | c34ca5f | 2024-06-11 18:24:06 +0000 | [diff] [blame] | 130 | "member_builtin_call.h", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 131 | "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 Clayton | 9860d3d | 2023-09-26 07:12:46 +0000 | [diff] [blame] | 142 | "traverse.h", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 143 | "unary.h", |
| 144 | "unreachable.h", |
Ryan Harrison | 71f1b39 | 2024-08-08 13:27:46 +0000 | [diff] [blame] | 145 | "unused.h", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 146 | "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 Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 156 | "//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 sinclair | d90557b | 2024-08-28 16:15:03 +0000 | [diff] [blame] | 170 | "//src/utils", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 171 | ], |
| 172 | copts = COPTS, |
| 173 | visibility = ["//visibility:public"], |
| 174 | ) |
| 175 | cc_library( |
| 176 | name = "test", |
| 177 | alwayslink = True, |
| 178 | srcs = [ |
| 179 | "access_test.cc", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 180 | "bitcast_test.cc", |
| 181 | "block_param_test.cc", |
| 182 | "block_test.cc", |
| 183 | "break_if_test.cc", |
James Price | 7ee30f5 | 2024-08-21 01:40:04 +0000 | [diff] [blame] | 184 | "builder_test.cc", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 185 | "constant_test.cc", |
| 186 | "construct_test.cc", |
| 187 | "continue_test.cc", |
| 188 | "convert_test.cc", |
Ben Clayton | 514a18a | 2024-01-09 10:44:27 +0000 | [diff] [blame] | 189 | "core_binary_test.cc", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 190 | "core_builtin_call_test.cc", |
Ben Clayton | b865a1e | 2024-01-08 13:01:50 +0000 | [diff] [blame] | 191 | "core_unary_test.cc", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 192 | "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 sinclair | 16cb4bd | 2023-09-21 08:52:11 +0000 | [diff] [blame] | 215 | "terminate_invocation_test.cc", |
Ben Clayton | 9860d3d | 2023-09-26 07:12:46 +0000 | [diff] [blame] | 216 | "traverse_test.cc", |
dan sinclair | 16cb4bd | 2023-09-21 08:52:11 +0000 | [diff] [blame] | 217 | "unreachable_test.cc", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 218 | "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 Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 228 | "//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 sinclair | d90557b | 2024-08-28 16:15:03 +0000 | [diff] [blame] | 244 | "//src/utils", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 245 | ], |
| 246 | copts = COPTS, |
| 247 | visibility = ["//visibility:public"], |
| 248 | ) |
James Price | 3576e1e | 2024-08-27 22:35:00 +0000 | [diff] [blame] | 249 | cc_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 sinclair | d90557b | 2024-08-28 16:15:03 +0000 | [diff] [blame] | 281 | "//src/utils", |
James Price | 3576e1e | 2024-08-27 22:35:00 +0000 | [diff] [blame] | 282 | ] + 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 | |
| 293 | alias( |
| 294 | name = "tint_build_wgsl_reader", |
| 295 | actual = "//src/tint:tint_build_wgsl_reader_true", |
| 296 | ) |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 297 | |