Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 1 | # Copyright 2021 The Tint Authors |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | import("//build_overrides/build.gni") |
| 16 | import("../../tint_overrides_with_defaults.gni") |
| 17 | |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 18 | if (tint_build_unittests) { |
| 19 | import("//testing/test.gni") |
| 20 | } |
| 21 | |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 22 | ############################################################################### |
| 23 | # Common - Configs, etc. shared across targets |
| 24 | ############################################################################### |
| 25 | |
| 26 | config("tint_common_config") { |
| 27 | include_dirs = [ |
| 28 | "${target_gen_dir}", |
| 29 | "${tint_root_dir}/", |
| 30 | "${tint_spirv_headers_dir}/include", |
| 31 | "${tint_spirv_tools_dir}/", |
| 32 | "${tint_spirv_tools_dir}/include", |
| 33 | ] |
| 34 | } |
| 35 | |
| 36 | config("tint_public_config") { |
| 37 | defines = [] |
| 38 | if (tint_build_spv_reader) { |
| 39 | defines += [ "TINT_BUILD_SPV_READER=1" ] |
| 40 | } else { |
| 41 | defines += [ "TINT_BUILD_SPV_READER=0" ] |
| 42 | } |
| 43 | |
| 44 | if (tint_build_spv_writer) { |
| 45 | defines += [ "TINT_BUILD_SPV_WRITER=1" ] |
| 46 | } else { |
| 47 | defines += [ "TINT_BUILD_SPV_WRITER=0" ] |
| 48 | } |
| 49 | |
| 50 | if (tint_build_wgsl_reader) { |
| 51 | defines += [ "TINT_BUILD_WGSL_READER=1" ] |
| 52 | } else { |
| 53 | defines += [ "TINT_BUILD_WGSL_READER=0" ] |
| 54 | } |
| 55 | |
| 56 | if (tint_build_wgsl_writer) { |
| 57 | defines += [ "TINT_BUILD_WGSL_WRITER=1" ] |
| 58 | } else { |
| 59 | defines += [ "TINT_BUILD_WGSL_WRITER=0" ] |
| 60 | } |
| 61 | |
| 62 | if (tint_build_msl_writer) { |
| 63 | defines += [ "TINT_BUILD_MSL_WRITER=1" ] |
| 64 | } else { |
| 65 | defines += [ "TINT_BUILD_MSL_WRITER=0" ] |
| 66 | } |
| 67 | |
| 68 | if (tint_build_hlsl_writer) { |
| 69 | defines += [ "TINT_BUILD_HLSL_WRITER=1" ] |
| 70 | } else { |
| 71 | defines += [ "TINT_BUILD_HLSL_WRITER=0" ] |
| 72 | } |
| 73 | |
| 74 | if (tint_build_glsl_writer) { |
| 75 | defines += [ "TINT_BUILD_GLSL_WRITER=1" ] |
| 76 | } else { |
| 77 | defines += [ "TINT_BUILD_GLSL_WRITER=0" ] |
| 78 | } |
| 79 | |
| 80 | include_dirs = [ |
| 81 | "${tint_root_dir}/", |
| 82 | "${tint_root_dir}/include/", |
| 83 | "${tint_spirv_headers_dir}/include", |
| 84 | ] |
| 85 | } |
| 86 | |
| 87 | config("tint_config") { |
| 88 | include_dirs = [] |
| 89 | if (tint_build_spv_reader || tint_build_spv_writer) { |
| 90 | include_dirs += [ "${tint_spirv_tools_dir}/include/" ] |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | ############################################################################### |
| 95 | # Helper library for IO operations |
| 96 | # Only to be used by tests and sample executable |
| 97 | ############################################################################### |
| 98 | source_set("tint_utils_io") { |
| 99 | sources = [ |
| 100 | "utils/io/command.h", |
| 101 | "utils/io/tmpfile.h", |
| 102 | ] |
| 103 | |
| 104 | if (is_linux || is_mac) { |
| 105 | sources += [ "utils/io/command_posix.cc" ] |
| 106 | sources += [ "utils/io/tmpfile_posix.cc" ] |
| 107 | } else if (is_win) { |
| 108 | sources += [ "utils/io/command_windows.cc" ] |
| 109 | sources += [ "utils/io/tmpfile_windows.cc" ] |
| 110 | } else { |
| 111 | sources += [ "utils/io/command_other.cc" ] |
| 112 | sources += [ "utils/io/tmpfile_other.cc" ] |
| 113 | } |
| 114 | |
| 115 | public_deps = [ ":libtint_core_all_src" ] |
| 116 | } |
| 117 | |
| 118 | ############################################################################### |
| 119 | # Helper library for validating generated shaders |
| 120 | # As this depends on tint_utils_io, this is only to be used by tests and sample |
| 121 | # executable |
| 122 | ############################################################################### |
| 123 | source_set("tint_val") { |
| 124 | sources = [ |
| 125 | "val/hlsl.cc", |
| 126 | "val/msl.cc", |
| 127 | "val/val.h", |
| 128 | ] |
| 129 | public_deps = [ ":tint_utils_io" ] |
| 130 | } |
| 131 | |
| 132 | ############################################################################### |
| 133 | # Library - Tint core and optional modules of libtint |
| 134 | ############################################################################### |
| 135 | # libtint source sets are divided into a non-optional core in :libtint_core_src |
| 136 | # and optional :libtint_*_src subsets, because ninja does not like having |
| 137 | # multiple source files with the same name, like function.cc, in the same |
| 138 | # source set |
| 139 | # target. |
| 140 | # |
| 141 | # Targets that want to use tint as a library should depend on ":libtint" and |
| 142 | # use the build flags to control what is included, instead of trying to specify |
| 143 | # the subsets that they want. |
| 144 | |
| 145 | template("libtint_source_set") { |
| 146 | source_set(target_name) { |
| 147 | forward_variables_from(invoker, "*", [ "configs" ]) |
| 148 | |
| 149 | if (!defined(invoker.deps)) { |
| 150 | deps = [] |
| 151 | } |
| 152 | deps += [ |
| 153 | "${tint_spirv_headers_dir}:spv_headers", |
| 154 | "${tint_spirv_tools_dir}:spvtools_core_enums_unified1", |
| 155 | "${tint_spirv_tools_dir}:spvtools_core_tables_unified1", |
| 156 | "${tint_spirv_tools_dir}:spvtools_headers", |
| 157 | "${tint_spirv_tools_dir}:spvtools_language_header_cldebuginfo100", |
| 158 | "${tint_spirv_tools_dir}:spvtools_language_header_debuginfo", |
| 159 | "${tint_spirv_tools_dir}:spvtools_language_header_vkdebuginfo100", |
| 160 | ] |
| 161 | |
| 162 | if (defined(invoker.configs)) { |
| 163 | configs += invoker.configs |
| 164 | } |
| 165 | configs += [ ":tint_common_config" ] |
| 166 | if (build_with_chromium) { |
| 167 | configs -= [ "//build/config/compiler:chromium_code" ] |
| 168 | configs += [ "//build/config/compiler:no_chromium_code" ] |
| 169 | } |
| 170 | |
| 171 | if (!defined(invoker.public_configs)) { |
| 172 | public_configs = [] |
| 173 | } |
| 174 | public_configs += [ ":tint_public_config" ] |
| 175 | } |
| 176 | } |
| 177 | |
| 178 | libtint_source_set("libtint_core_all_src") { |
| 179 | sources = [ |
Dan Sinclair | 749abea | 2022-11-02 17:07:25 +0000 | [diff] [blame] | 180 | "ast/access.cc", |
| 181 | "ast/access.h", |
| 182 | "ast/address_space.cc", |
| 183 | "ast/address_space.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 184 | "ast/alias.cc", |
| 185 | "ast/alias.h", |
| 186 | "ast/array.cc", |
| 187 | "ast/array.h", |
| 188 | "ast/assignment_statement.cc", |
| 189 | "ast/assignment_statement.h", |
| 190 | "ast/ast_type.cc", # TODO(bclayton) - rename to type.cc |
| 191 | "ast/atomic.cc", |
| 192 | "ast/atomic.h", |
| 193 | "ast/attribute.cc", |
| 194 | "ast/attribute.h", |
| 195 | "ast/binary_expression.cc", |
| 196 | "ast/binary_expression.h", |
| 197 | "ast/binding_attribute.cc", |
| 198 | "ast/binding_attribute.h", |
| 199 | "ast/bitcast_expression.cc", |
| 200 | "ast/bitcast_expression.h", |
| 201 | "ast/block_statement.cc", |
| 202 | "ast/block_statement.h", |
| 203 | "ast/bool.cc", |
| 204 | "ast/bool.h", |
| 205 | "ast/bool_literal_expression.cc", |
| 206 | "ast/bool_literal_expression.h", |
dan sinclair | b8b0c21 | 2022-10-20 22:45:50 +0000 | [diff] [blame] | 207 | "ast/break_if_statement.cc", |
| 208 | "ast/break_if_statement.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 209 | "ast/break_statement.cc", |
| 210 | "ast/break_statement.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 211 | "ast/builtin_attribute.cc", |
| 212 | "ast/builtin_attribute.h", |
Dan Sinclair | 749abea | 2022-11-02 17:07:25 +0000 | [diff] [blame] | 213 | "ast/builtin_value.cc", |
| 214 | "ast/builtin_value.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 215 | "ast/call_expression.cc", |
| 216 | "ast/call_expression.h", |
| 217 | "ast/call_statement.cc", |
| 218 | "ast/call_statement.h", |
dan sinclair | f148f08 | 2022-10-19 15:55:02 +0000 | [diff] [blame] | 219 | "ast/case_selector.cc", |
| 220 | "ast/case_selector.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 221 | "ast/case_statement.cc", |
| 222 | "ast/case_statement.h", |
James Price | 4924186 | 2022-03-31 22:30:10 +0000 | [diff] [blame] | 223 | "ast/compound_assignment_statement.cc", |
| 224 | "ast/compound_assignment_statement.h", |
Ben Clayton | 7ee3245 | 2022-06-20 20:46:22 +0000 | [diff] [blame] | 225 | "ast/const.cc", |
| 226 | "ast/const.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 227 | "ast/continue_statement.cc", |
| 228 | "ast/continue_statement.h", |
| 229 | "ast/depth_multisampled_texture.cc", |
| 230 | "ast/depth_multisampled_texture.h", |
| 231 | "ast/depth_texture.cc", |
| 232 | "ast/depth_texture.h", |
| 233 | "ast/disable_validation_attribute.cc", |
| 234 | "ast/disable_validation_attribute.h", |
| 235 | "ast/discard_statement.cc", |
| 236 | "ast/discard_statement.h", |
Zhaoming Jiang | 7098d3d | 2022-04-27 02:27:52 +0000 | [diff] [blame] | 237 | "ast/enable.cc", |
| 238 | "ast/enable.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 239 | "ast/expression.cc", |
| 240 | "ast/expression.h", |
Dan Sinclair | 749abea | 2022-11-02 17:07:25 +0000 | [diff] [blame] | 241 | "ast/extension.cc", |
| 242 | "ast/extension.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 243 | "ast/external_texture.cc", |
| 244 | "ast/external_texture.h", |
Zhaoming Jiang | 62bfd31 | 2022-05-13 12:01:11 +0000 | [diff] [blame] | 245 | "ast/f16.cc", |
| 246 | "ast/f16.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 247 | "ast/f32.cc", |
| 248 | "ast/f32.h", |
| 249 | "ast/fallthrough_statement.cc", |
| 250 | "ast/fallthrough_statement.h", |
| 251 | "ast/float_literal_expression.cc", |
| 252 | "ast/float_literal_expression.h", |
| 253 | "ast/for_loop_statement.cc", |
| 254 | "ast/for_loop_statement.h", |
| 255 | "ast/function.cc", |
| 256 | "ast/function.h", |
| 257 | "ast/group_attribute.cc", |
| 258 | "ast/group_attribute.h", |
| 259 | "ast/i32.cc", |
| 260 | "ast/i32.h", |
| 261 | "ast/id_attribute.cc", |
| 262 | "ast/id_attribute.h", |
| 263 | "ast/identifier_expression.cc", |
| 264 | "ast/identifier_expression.h", |
| 265 | "ast/if_statement.cc", |
| 266 | "ast/if_statement.h", |
James Price | ebe9741 | 2022-04-07 13:42:45 +0000 | [diff] [blame] | 267 | "ast/increment_decrement_statement.cc", |
| 268 | "ast/increment_decrement_statement.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 269 | "ast/index_accessor_expression.cc", |
| 270 | "ast/index_accessor_expression.h", |
| 271 | "ast/int_literal_expression.cc", |
| 272 | "ast/int_literal_expression.h", |
| 273 | "ast/internal_attribute.cc", |
| 274 | "ast/internal_attribute.h", |
Dan Sinclair | 749abea | 2022-11-02 17:07:25 +0000 | [diff] [blame] | 275 | "ast/interpolate_attribute.cc", |
| 276 | "ast/interpolate_attribute.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 277 | "ast/invariant_attribute.cc", |
| 278 | "ast/invariant_attribute.h", |
Ben Clayton | dcdf66e | 2022-06-17 12:48:51 +0000 | [diff] [blame] | 279 | "ast/let.cc", |
| 280 | "ast/let.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 281 | "ast/literal_expression.cc", |
| 282 | "ast/literal_expression.h", |
| 283 | "ast/location_attribute.cc", |
| 284 | "ast/location_attribute.h", |
| 285 | "ast/loop_statement.cc", |
| 286 | "ast/loop_statement.h", |
| 287 | "ast/matrix.cc", |
| 288 | "ast/matrix.h", |
| 289 | "ast/member_accessor_expression.cc", |
| 290 | "ast/member_accessor_expression.h", |
| 291 | "ast/module.cc", |
| 292 | "ast/module.h", |
| 293 | "ast/multisampled_texture.cc", |
| 294 | "ast/multisampled_texture.h", |
| 295 | "ast/node.cc", |
| 296 | "ast/node.h", |
dan sinclair | 256f111 | 2022-07-22 16:05:06 +0000 | [diff] [blame] | 297 | "ast/node_id.h", |
Ben Clayton | dcdf66e | 2022-06-17 12:48:51 +0000 | [diff] [blame] | 298 | "ast/override.cc", |
| 299 | "ast/override.h", |
| 300 | "ast/parameter.cc", |
| 301 | "ast/parameter.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 302 | "ast/phony_expression.cc", |
| 303 | "ast/phony_expression.h", |
| 304 | "ast/pipeline_stage.cc", |
| 305 | "ast/pipeline_stage.h", |
| 306 | "ast/pointer.cc", |
| 307 | "ast/pointer.h", |
| 308 | "ast/return_statement.cc", |
| 309 | "ast/return_statement.h", |
| 310 | "ast/sampled_texture.cc", |
| 311 | "ast/sampled_texture.h", |
| 312 | "ast/sampler.cc", |
| 313 | "ast/sampler.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 314 | "ast/stage_attribute.cc", |
| 315 | "ast/stage_attribute.h", |
| 316 | "ast/statement.cc", |
| 317 | "ast/statement.h", |
Ben Clayton | bfd1a81 | 2022-08-02 23:16:25 +0000 | [diff] [blame] | 318 | "ast/static_assert.cc", |
| 319 | "ast/static_assert.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 320 | "ast/storage_texture.cc", |
| 321 | "ast/storage_texture.h", |
| 322 | "ast/stride_attribute.cc", |
| 323 | "ast/stride_attribute.h", |
| 324 | "ast/struct.cc", |
| 325 | "ast/struct.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 326 | "ast/struct_member.cc", |
| 327 | "ast/struct_member.h", |
| 328 | "ast/struct_member_align_attribute.cc", |
| 329 | "ast/struct_member_align_attribute.h", |
| 330 | "ast/struct_member_offset_attribute.cc", |
| 331 | "ast/struct_member_offset_attribute.h", |
| 332 | "ast/struct_member_size_attribute.cc", |
| 333 | "ast/struct_member_size_attribute.h", |
| 334 | "ast/switch_statement.cc", |
| 335 | "ast/switch_statement.h", |
Dan Sinclair | 749abea | 2022-11-02 17:07:25 +0000 | [diff] [blame] | 336 | "ast/texel_format.cc", |
| 337 | "ast/texel_format.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 338 | "ast/texture.cc", |
| 339 | "ast/texture.h", |
| 340 | "ast/traverse_expressions.h", |
| 341 | "ast/type.h", |
| 342 | "ast/type_decl.cc", |
| 343 | "ast/type_decl.h", |
| 344 | "ast/type_name.cc", |
| 345 | "ast/type_name.h", |
| 346 | "ast/u32.cc", |
| 347 | "ast/u32.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 348 | "ast/unary_op.cc", |
| 349 | "ast/unary_op.h", |
| 350 | "ast/unary_op_expression.cc", |
| 351 | "ast/unary_op_expression.h", |
Ben Clayton | dcdf66e | 2022-06-17 12:48:51 +0000 | [diff] [blame] | 352 | "ast/var.cc", |
| 353 | "ast/var.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 354 | "ast/variable.cc", |
| 355 | "ast/variable.h", |
| 356 | "ast/variable_decl_statement.cc", |
| 357 | "ast/variable_decl_statement.h", |
| 358 | "ast/vector.cc", |
| 359 | "ast/vector.h", |
| 360 | "ast/void.cc", |
| 361 | "ast/void.h", |
dan sinclair | 49d1a2d | 2022-06-16 12:01:27 +0000 | [diff] [blame] | 362 | "ast/while_statement.cc", |
| 363 | "ast/while_statement.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 364 | "ast/workgroup_attribute.cc", |
| 365 | "ast/workgroup_attribute.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 366 | "castable.cc", |
| 367 | "castable.h", |
| 368 | "clone_context.cc", |
| 369 | "clone_context.h", |
| 370 | "debug.cc", |
| 371 | "debug.h", |
| 372 | "demangler.cc", |
| 373 | "demangler.h", |
| 374 | "diagnostic/diagnostic.cc", |
| 375 | "diagnostic/diagnostic.h", |
| 376 | "diagnostic/formatter.cc", |
| 377 | "diagnostic/formatter.h", |
| 378 | "diagnostic/printer.cc", |
| 379 | "diagnostic/printer.h", |
| 380 | "inspector/entry_point.cc", |
| 381 | "inspector/entry_point.h", |
| 382 | "inspector/inspector.cc", |
| 383 | "inspector/inspector.h", |
| 384 | "inspector/resource_binding.cc", |
| 385 | "inspector/resource_binding.h", |
| 386 | "inspector/scalar.cc", |
| 387 | "inspector/scalar.h", |
Ben Clayton | c2eccfc | 2022-05-25 15:04:24 +0000 | [diff] [blame] | 388 | "number.cc", |
Zhaoming Jiang | 62bfd31 | 2022-05-13 12:01:11 +0000 | [diff] [blame] | 389 | "number.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 390 | "program.cc", |
| 391 | "program.h", |
| 392 | "program_builder.cc", |
| 393 | "program_builder.h", |
| 394 | "program_id.cc", |
| 395 | "program_id.h", |
| 396 | "reader/reader.cc", |
| 397 | "reader/reader.h", |
Stephen White | 863d9ed | 2022-09-02 19:19:10 +0000 | [diff] [blame] | 398 | "reflection.h", |
Ben Clayton | 451eee0 | 2022-06-01 23:57:20 +0000 | [diff] [blame] | 399 | "resolver/const_eval.cc", |
| 400 | "resolver/const_eval.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 401 | "resolver/dependency_graph.cc", |
| 402 | "resolver/dependency_graph.h", |
Dan Sinclair | 749abea | 2022-11-02 17:07:25 +0000 | [diff] [blame] | 403 | "resolver/init_conv_intrinsic.cc", |
| 404 | "resolver/init_conv_intrinsic.h", |
Ben Clayton | e132516 | 2022-05-06 15:13:01 +0000 | [diff] [blame] | 405 | "resolver/intrinsic_table.cc", |
| 406 | "resolver/intrinsic_table.h", |
Dan Sinclair | 749abea | 2022-11-02 17:07:25 +0000 | [diff] [blame] | 407 | "resolver/intrinsic_table.inl", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 408 | "resolver/resolver.cc", |
| 409 | "resolver/resolver.h", |
dan sinclair | bb62ef0 | 2022-04-19 15:00:44 +0000 | [diff] [blame] | 410 | "resolver/sem_helper.cc", |
| 411 | "resolver/sem_helper.h", |
James Price | be656f7 | 2022-05-11 22:05:15 +0000 | [diff] [blame] | 412 | "resolver/uniformity.cc", |
| 413 | "resolver/uniformity.h", |
dan sinclair | f05575b | 2022-04-21 13:40:16 +0000 | [diff] [blame] | 414 | "resolver/validator.cc", |
| 415 | "resolver/validator.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 416 | "scope_stack.h", |
Ben Clayton | 23696b1 | 2022-05-18 21:56:28 +0000 | [diff] [blame] | 417 | "sem/abstract_float.h", |
| 418 | "sem/abstract_int.h", |
| 419 | "sem/abstract_numeric.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 420 | "sem/array.h", |
Ben Clayton | 01004b7 | 2022-04-28 18:49:04 +0000 | [diff] [blame] | 421 | "sem/atomic.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 422 | "sem/behavior.h", |
| 423 | "sem/binding_point.h", |
Ben Clayton | 01004b7 | 2022-04-28 18:49:04 +0000 | [diff] [blame] | 424 | "sem/bool.h", |
dan sinclair | b8b0c21 | 2022-10-20 22:45:50 +0000 | [diff] [blame] | 425 | "sem/break_if_statement.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 426 | "sem/builtin.h", |
Dan Sinclair | 749abea | 2022-11-02 17:07:25 +0000 | [diff] [blame] | 427 | "sem/builtin_type.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 428 | "sem/call.h", |
| 429 | "sem/call_target.h", |
| 430 | "sem/constant.h", |
Ben Clayton | 01004b7 | 2022-04-28 18:49:04 +0000 | [diff] [blame] | 431 | "sem/depth_multisampled_texture.h", |
| 432 | "sem/depth_texture.h", |
Ben Clayton | 83bd738 | 2022-07-15 23:46:31 +0000 | [diff] [blame] | 433 | "sem/evaluation_stage.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 434 | "sem/expression.h", |
Ben Clayton | 01004b7 | 2022-04-28 18:49:04 +0000 | [diff] [blame] | 435 | "sem/external_texture.h", |
Zhaoming Jiang | 62bfd31 | 2022-05-13 12:01:11 +0000 | [diff] [blame] | 436 | "sem/f16.h", |
Ben Clayton | 01004b7 | 2022-04-28 18:49:04 +0000 | [diff] [blame] | 437 | "sem/f32.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 438 | "sem/for_loop_statement.h", |
Ben Clayton | 01004b7 | 2022-04-28 18:49:04 +0000 | [diff] [blame] | 439 | "sem/i32.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 440 | "sem/if_statement.h", |
Antonio Maiorano | dfeaf290 | 2022-06-24 20:34:00 +0000 | [diff] [blame] | 441 | "sem/index_accessor_expression.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 442 | "sem/info.h", |
| 443 | "sem/loop_statement.h", |
Ben Clayton | 932418e | 2022-05-24 21:42:03 +0000 | [diff] [blame] | 444 | "sem/materialize.h", |
Ben Clayton | 01004b7 | 2022-04-28 18:49:04 +0000 | [diff] [blame] | 445 | "sem/matrix.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 446 | "sem/module.h", |
Ben Clayton | 01004b7 | 2022-04-28 18:49:04 +0000 | [diff] [blame] | 447 | "sem/multisampled_texture.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 448 | "sem/node.h", |
Dan Sinclair | 749abea | 2022-11-02 17:07:25 +0000 | [diff] [blame] | 449 | "sem/parameter_usage.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 450 | "sem/pipeline_stage_set.h", |
Ben Clayton | 01004b7 | 2022-04-28 18:49:04 +0000 | [diff] [blame] | 451 | "sem/pointer.h", |
| 452 | "sem/reference.h", |
| 453 | "sem/sampled_texture.h", |
Ben Clayton | 01004b7 | 2022-04-28 18:49:04 +0000 | [diff] [blame] | 454 | "sem/sampler.h", |
dan sinclair | 41e4d9a | 2022-05-01 14:40:55 +0000 | [diff] [blame] | 455 | "sem/sampler_texture_pair.h", |
Ben Clayton | 01004b7 | 2022-04-28 18:49:04 +0000 | [diff] [blame] | 456 | "sem/storage_texture.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 457 | "sem/switch_statement.h", |
Ben Clayton | 01004b7 | 2022-04-28 18:49:04 +0000 | [diff] [blame] | 458 | "sem/texture.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 459 | "sem/type.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 460 | "sem/type_conversion.h", |
dan sinclair | 6e77b47 | 2022-10-20 13:38:28 +0000 | [diff] [blame] | 461 | "sem/type_initializer.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 462 | "sem/type_manager.h", |
| 463 | "sem/type_mappings.h", |
Ben Clayton | 01004b7 | 2022-04-28 18:49:04 +0000 | [diff] [blame] | 464 | "sem/u32.h", |
| 465 | "sem/vector.h", |
| 466 | "sem/void.h", |
dan sinclair | 49d1a2d | 2022-06-16 12:01:27 +0000 | [diff] [blame] | 467 | "sem/while_statement.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 468 | "source.cc", |
| 469 | "source.h", |
| 470 | "symbol.cc", |
| 471 | "symbol.h", |
| 472 | "symbol_table.cc", |
| 473 | "symbol_table.h", |
| 474 | "text/unicode.cc", |
| 475 | "text/unicode.h", |
| 476 | "traits.h", |
Stephen White | 863d9ed | 2022-09-02 19:19:10 +0000 | [diff] [blame] | 477 | "transform/add_block_attribute.cc", |
| 478 | "transform/add_block_attribute.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 479 | "transform/add_empty_entry_point.cc", |
| 480 | "transform/add_empty_entry_point.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 481 | "transform/array_length_from_uniform.cc", |
| 482 | "transform/array_length_from_uniform.h", |
| 483 | "transform/binding_remapper.cc", |
| 484 | "transform/binding_remapper.h", |
Ben Clayton | 27aa57c | 2022-02-22 23:13:39 +0000 | [diff] [blame] | 485 | "transform/builtin_polyfill.cc", |
| 486 | "transform/builtin_polyfill.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 487 | "transform/calculate_array_length.cc", |
| 488 | "transform/calculate_array_length.h", |
| 489 | "transform/canonicalize_entry_point_io.cc", |
| 490 | "transform/canonicalize_entry_point_io.h", |
Corentin Wallez | 98a7cd1 | 2022-10-11 09:52:25 +0000 | [diff] [blame] | 491 | "transform/clamp_frag_depth.cc", |
| 492 | "transform/clamp_frag_depth.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 493 | "transform/combine_samplers.cc", |
| 494 | "transform/combine_samplers.h", |
| 495 | "transform/decompose_memory_access.cc", |
| 496 | "transform/decompose_memory_access.h", |
| 497 | "transform/decompose_strided_array.cc", |
| 498 | "transform/decompose_strided_array.h", |
| 499 | "transform/decompose_strided_matrix.cc", |
| 500 | "transform/decompose_strided_matrix.h", |
James Price | 791b435 | 2022-05-11 13:50:33 +0000 | [diff] [blame] | 501 | "transform/disable_uniformity_analysis.cc", |
| 502 | "transform/disable_uniformity_analysis.h", |
Corentin Wallez | b28d6c8 | 2022-04-07 11:36:06 +0000 | [diff] [blame] | 503 | "transform/expand_compound_assignment.cc", |
| 504 | "transform/expand_compound_assignment.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 505 | "transform/first_index_offset.cc", |
| 506 | "transform/first_index_offset.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 507 | "transform/for_loop_to_loop.cc", |
| 508 | "transform/for_loop_to_loop.h", |
| 509 | "transform/localize_struct_array_assignment.cc", |
| 510 | "transform/localize_struct_array_assignment.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 511 | "transform/manager.cc", |
| 512 | "transform/manager.h", |
James Price | 5de8b43 | 2022-10-31 14:49:03 +0000 | [diff] [blame] | 513 | "transform/merge_return.cc", |
| 514 | "transform/merge_return.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 515 | "transform/module_scope_var_to_entry_point_param.cc", |
| 516 | "transform/module_scope_var_to_entry_point_param.h", |
| 517 | "transform/multiplanar_external_texture.cc", |
| 518 | "transform/multiplanar_external_texture.h", |
| 519 | "transform/num_workgroups_from_uniform.cc", |
| 520 | "transform/num_workgroups_from_uniform.h", |
Ben Clayton | a92f425 | 2022-10-27 14:36:49 +0000 | [diff] [blame] | 521 | "transform/packed_vec3.cc", |
| 522 | "transform/packed_vec3.h", |
Stephen White | 05d8b02 | 2022-09-13 19:48:51 +0000 | [diff] [blame] | 523 | "transform/pad_structs.cc", |
| 524 | "transform/pad_structs.h", |
Ben Clayton | 7ebcfc7 | 2022-06-27 20:20:25 +0000 | [diff] [blame] | 525 | "transform/promote_initializers_to_let.cc", |
| 526 | "transform/promote_initializers_to_let.h", |
Antonio Maiorano | c25ddf4 | 2022-03-15 15:03:03 +0000 | [diff] [blame] | 527 | "transform/promote_side_effects_to_decl.cc", |
| 528 | "transform/promote_side_effects_to_decl.h", |
Antonio Maiorano | b349710 | 2022-03-31 15:02:25 +0000 | [diff] [blame] | 529 | "transform/remove_continue_in_switch.cc", |
| 530 | "transform/remove_continue_in_switch.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 531 | "transform/remove_phonies.cc", |
| 532 | "transform/remove_phonies.h", |
| 533 | "transform/remove_unreachable_statements.cc", |
| 534 | "transform/remove_unreachable_statements.h", |
| 535 | "transform/renamer.cc", |
| 536 | "transform/renamer.h", |
| 537 | "transform/robustness.cc", |
| 538 | "transform/robustness.h", |
| 539 | "transform/simplify_pointers.cc", |
| 540 | "transform/simplify_pointers.h", |
| 541 | "transform/single_entry_point.cc", |
| 542 | "transform/single_entry_point.h", |
Antonio Maiorano | 268d7b8 | 2022-06-24 22:28:23 +0000 | [diff] [blame] | 543 | "transform/spirv_atomic.cc", |
| 544 | "transform/spirv_atomic.h", |
Ben Clayton | 657e61d | 2022-09-01 22:12:19 +0000 | [diff] [blame] | 545 | "transform/std140.cc", |
| 546 | "transform/std140.h", |
dan sinclair | 256f111 | 2022-07-22 16:05:06 +0000 | [diff] [blame] | 547 | "transform/substitute_override.cc", |
| 548 | "transform/substitute_override.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 549 | "transform/transform.cc", |
| 550 | "transform/transform.h", |
| 551 | "transform/unshadow.cc", |
| 552 | "transform/unshadow.h", |
Antonio Maiorano | 66d6668 | 2022-03-28 20:51:32 +0000 | [diff] [blame] | 553 | "transform/unwind_discard_functions.cc", |
| 554 | "transform/unwind_discard_functions.h", |
Antonio Maiorano | c2e9bb7 | 2022-03-30 20:11:35 +0000 | [diff] [blame] | 555 | "transform/utils/get_insertion_point.cc", |
| 556 | "transform/utils/get_insertion_point.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 557 | "transform/utils/hoist_to_decl_before.cc", |
| 558 | "transform/utils/hoist_to_decl_before.h", |
| 559 | "transform/var_for_dynamic_index.cc", |
| 560 | "transform/var_for_dynamic_index.h", |
Zhaoming Jiang | 426b47e | 2022-09-01 03:08:20 +0000 | [diff] [blame] | 561 | "transform/vectorize_matrix_conversions.cc", |
| 562 | "transform/vectorize_matrix_conversions.h", |
dan sinclair | 6e77b47 | 2022-10-20 13:38:28 +0000 | [diff] [blame] | 563 | "transform/vectorize_scalar_matrix_initializers.cc", |
| 564 | "transform/vectorize_scalar_matrix_initializers.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 565 | "transform/vertex_pulling.cc", |
| 566 | "transform/vertex_pulling.h", |
dan sinclair | 49d1a2d | 2022-06-16 12:01:27 +0000 | [diff] [blame] | 567 | "transform/while_to_loop.cc", |
| 568 | "transform/while_to_loop.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 569 | "transform/zero_init_workgroup_memory.cc", |
| 570 | "transform/zero_init_workgroup_memory.h", |
Ben Clayton | 7cbd820 | 2022-05-05 15:34:41 +0000 | [diff] [blame] | 571 | "utils/bitcast.h", |
Ben Clayton | e43034b | 2022-07-21 23:32:24 +0000 | [diff] [blame] | 572 | "utils/bitset.h", |
Ben Clayton | 4cb1329 | 2022-03-04 21:09:24 +0000 | [diff] [blame] | 573 | "utils/block_allocator.h", |
Ben Clayton | 9707e6b | 2022-05-25 19:28:55 +0000 | [diff] [blame] | 574 | "utils/compiler_macros.h", |
| 575 | "utils/concat.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 576 | "utils/crc32.h", |
| 577 | "utils/debugger.cc", |
| 578 | "utils/debugger.h", |
| 579 | "utils/enum_set.h", |
Ben Clayton | 648bd7b | 2022-09-02 11:40:19 +0000 | [diff] [blame] | 580 | "utils/foreach_macro.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 581 | "utils/hash.h", |
Ben Clayton | e372511 | 2022-11-02 19:46:49 +0000 | [diff] [blame^] | 582 | "utils/hashmap_base.h", |
Ben Clayton | e13160e | 2022-08-17 16:28:23 +0000 | [diff] [blame] | 583 | "utils/hashmap.h", |
| 584 | "utils/hashset.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 585 | "utils/map.h", |
| 586 | "utils/math.h", |
| 587 | "utils/scoped_assignment.h", |
Ben Clayton | d04c54e | 2022-10-11 17:53:07 +0000 | [diff] [blame] | 588 | "utils/string.cc", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 589 | "utils/string.h", |
Ben Clayton | e228319 | 2022-03-05 00:29:15 +0000 | [diff] [blame] | 590 | "utils/unique_allocator.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 591 | "utils/unique_vector.h", |
Ben Clayton | 3bc20e3 | 2022-07-21 19:34:05 +0000 | [diff] [blame] | 592 | "utils/vector.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 593 | "writer/append_vector.cc", |
| 594 | "writer/append_vector.h", |
| 595 | "writer/array_length_from_uniform_options.cc", |
| 596 | "writer/array_length_from_uniform_options.h", |
Ben Clayton | 1a56778 | 2022-10-14 13:38:27 +0000 | [diff] [blame] | 597 | "writer/check_supported_extensions.cc", |
| 598 | "writer/check_supported_extensions.h", |
Antonio Maiorano | 4e98fb0 | 2022-05-02 19:49:19 +0000 | [diff] [blame] | 599 | "writer/flatten_bindings.cc", |
| 600 | "writer/flatten_bindings.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 601 | "writer/float_to_string.cc", |
| 602 | "writer/float_to_string.h", |
Antonio Maiorano | a730eb7 | 2022-04-06 13:57:54 +0000 | [diff] [blame] | 603 | "writer/generate_external_texture_bindings.cc", |
| 604 | "writer/generate_external_texture_bindings.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 605 | "writer/text.cc", |
| 606 | "writer/text.h", |
| 607 | "writer/text_generator.cc", |
| 608 | "writer/text_generator.h", |
| 609 | "writer/writer.cc", |
| 610 | "writer/writer.h", |
| 611 | ] |
| 612 | |
| 613 | if (is_linux) { |
| 614 | sources += [ "diagnostic/printer_linux.cc" ] |
| 615 | } else if (is_win) { |
| 616 | sources += [ "diagnostic/printer_windows.cc" ] |
| 617 | } else { |
| 618 | sources += [ "diagnostic/printer_other.cc" ] |
| 619 | } |
| 620 | } |
| 621 | |
| 622 | libtint_source_set("libtint_sem_src") { |
| 623 | sources = [ |
Ben Clayton | 9432887 | 2022-04-29 09:14:15 +0000 | [diff] [blame] | 624 | "sem/abstract_float.cc", |
| 625 | "sem/abstract_float.h", |
| 626 | "sem/abstract_int.cc", |
| 627 | "sem/abstract_int.h", |
| 628 | "sem/abstract_numeric.cc", |
| 629 | "sem/abstract_numeric.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 630 | "sem/array.cc", |
| 631 | "sem/array.h", |
Ben Clayton | 01004b7 | 2022-04-28 18:49:04 +0000 | [diff] [blame] | 632 | "sem/atomic.cc", |
| 633 | "sem/atomic.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 634 | "sem/behavior.cc", |
| 635 | "sem/behavior.h", |
| 636 | "sem/binding_point.h", |
| 637 | "sem/block_statement.cc", |
Ben Clayton | 01004b7 | 2022-04-28 18:49:04 +0000 | [diff] [blame] | 638 | "sem/bool.cc", |
| 639 | "sem/bool.h", |
dan sinclair | b8b0c21 | 2022-10-20 22:45:50 +0000 | [diff] [blame] | 640 | "sem/break_if_statement.cc", |
| 641 | "sem/break_if_statement.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 642 | "sem/builtin.cc", |
| 643 | "sem/builtin.h", |
Dan Sinclair | 749abea | 2022-11-02 17:07:25 +0000 | [diff] [blame] | 644 | "sem/builtin_type.cc", |
| 645 | "sem/builtin_type.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 646 | "sem/call.cc", |
| 647 | "sem/call.h", |
| 648 | "sem/call_target.cc", |
| 649 | "sem/call_target.h", |
| 650 | "sem/constant.cc", |
| 651 | "sem/constant.h", |
Ben Clayton | 01004b7 | 2022-04-28 18:49:04 +0000 | [diff] [blame] | 652 | "sem/depth_multisampled_texture.cc", |
| 653 | "sem/depth_multisampled_texture.h", |
| 654 | "sem/depth_texture.cc", |
| 655 | "sem/depth_texture.h", |
Ben Clayton | 83bd738 | 2022-07-15 23:46:31 +0000 | [diff] [blame] | 656 | "sem/evaluation_stage.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 657 | "sem/expression.cc", |
| 658 | "sem/expression.h", |
Ben Clayton | 01004b7 | 2022-04-28 18:49:04 +0000 | [diff] [blame] | 659 | "sem/external_texture.cc", |
| 660 | "sem/external_texture.h", |
Zhaoming Jiang | 62bfd31 | 2022-05-13 12:01:11 +0000 | [diff] [blame] | 661 | "sem/f16.cc", |
| 662 | "sem/f16.h", |
Ben Clayton | 01004b7 | 2022-04-28 18:49:04 +0000 | [diff] [blame] | 663 | "sem/f32.cc", |
| 664 | "sem/f32.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 665 | "sem/for_loop_statement.cc", |
| 666 | "sem/for_loop_statement.h", |
| 667 | "sem/function.cc", |
Ben Clayton | 01004b7 | 2022-04-28 18:49:04 +0000 | [diff] [blame] | 668 | "sem/i32.cc", |
| 669 | "sem/i32.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 670 | "sem/if_statement.cc", |
| 671 | "sem/if_statement.h", |
Antonio Maiorano | dfeaf290 | 2022-06-24 20:34:00 +0000 | [diff] [blame] | 672 | "sem/index_accessor_expression.cc", |
| 673 | "sem/index_accessor_expression.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 674 | "sem/info.cc", |
| 675 | "sem/info.h", |
| 676 | "sem/loop_statement.cc", |
| 677 | "sem/loop_statement.h", |
Ben Clayton | 2081ee4 | 2022-05-19 19:32:29 +0000 | [diff] [blame] | 678 | "sem/materialize.cc", |
| 679 | "sem/materialize.h", |
Ben Clayton | 01004b7 | 2022-04-28 18:49:04 +0000 | [diff] [blame] | 680 | "sem/matrix.cc", |
| 681 | "sem/matrix.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 682 | "sem/member_accessor_expression.cc", |
| 683 | "sem/module.cc", |
| 684 | "sem/module.h", |
Ben Clayton | 01004b7 | 2022-04-28 18:49:04 +0000 | [diff] [blame] | 685 | "sem/multisampled_texture.cc", |
| 686 | "sem/multisampled_texture.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 687 | "sem/node.cc", |
| 688 | "sem/node.h", |
Dan Sinclair | 749abea | 2022-11-02 17:07:25 +0000 | [diff] [blame] | 689 | "sem/parameter_usage.cc", |
| 690 | "sem/parameter_usage.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 691 | "sem/pipeline_stage_set.h", |
Ben Clayton | 01004b7 | 2022-04-28 18:49:04 +0000 | [diff] [blame] | 692 | "sem/pointer.cc", |
| 693 | "sem/pointer.h", |
| 694 | "sem/reference.cc", |
| 695 | "sem/reference.h", |
| 696 | "sem/sampled_texture.cc", |
| 697 | "sem/sampled_texture.h", |
| 698 | "sem/sampler.cc", |
| 699 | "sem/sampler.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 700 | "sem/statement.cc", |
Ben Clayton | 01004b7 | 2022-04-28 18:49:04 +0000 | [diff] [blame] | 701 | "sem/storage_texture.cc", |
| 702 | "sem/storage_texture.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 703 | "sem/struct.cc", |
| 704 | "sem/switch_statement.cc", |
| 705 | "sem/switch_statement.h", |
Ben Clayton | 01004b7 | 2022-04-28 18:49:04 +0000 | [diff] [blame] | 706 | "sem/texture.cc", |
| 707 | "sem/texture.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 708 | "sem/type.cc", |
| 709 | "sem/type.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 710 | "sem/type_conversion.cc", |
| 711 | "sem/type_conversion.h", |
dan sinclair | 6e77b47 | 2022-10-20 13:38:28 +0000 | [diff] [blame] | 712 | "sem/type_initializer.cc", |
| 713 | "sem/type_initializer.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 714 | "sem/type_manager.cc", |
| 715 | "sem/type_manager.h", |
| 716 | "sem/type_mappings.h", |
Ben Clayton | 01004b7 | 2022-04-28 18:49:04 +0000 | [diff] [blame] | 717 | "sem/u32.cc", |
| 718 | "sem/u32.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 719 | "sem/variable.cc", |
Ben Clayton | 01004b7 | 2022-04-28 18:49:04 +0000 | [diff] [blame] | 720 | "sem/vector.cc", |
| 721 | "sem/vector.h", |
| 722 | "sem/void.cc", |
| 723 | "sem/void.h", |
dan sinclair | 49d1a2d | 2022-06-16 12:01:27 +0000 | [diff] [blame] | 724 | "sem/while_statement.cc", |
| 725 | "sem/while_statement.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 726 | ] |
| 727 | |
| 728 | public_deps = [ ":libtint_core_all_src" ] |
| 729 | } |
| 730 | |
| 731 | libtint_source_set("libtint_core_src") { |
| 732 | public_deps = [ |
| 733 | ":libtint_core_all_src", |
| 734 | ":libtint_sem_src", |
| 735 | ] |
| 736 | } |
| 737 | |
| 738 | libtint_source_set("libtint_spv_reader_src") { |
| 739 | sources = [ |
| 740 | "reader/spirv/construct.cc", |
| 741 | "reader/spirv/construct.h", |
| 742 | "reader/spirv/entry_point_info.cc", |
| 743 | "reader/spirv/entry_point_info.h", |
| 744 | "reader/spirv/enum_converter.cc", |
| 745 | "reader/spirv/enum_converter.h", |
| 746 | "reader/spirv/fail_stream.h", |
| 747 | "reader/spirv/function.cc", |
| 748 | "reader/spirv/function.h", |
| 749 | "reader/spirv/namer.cc", |
| 750 | "reader/spirv/namer.h", |
| 751 | "reader/spirv/parser.cc", |
| 752 | "reader/spirv/parser.h", |
| 753 | "reader/spirv/parser_impl.cc", |
| 754 | "reader/spirv/parser_impl.h", |
| 755 | "reader/spirv/parser_type.cc", |
| 756 | "reader/spirv/parser_type.h", |
| 757 | "reader/spirv/usage.cc", |
| 758 | "reader/spirv/usage.h", |
| 759 | ] |
| 760 | |
| 761 | public_deps = [ |
| 762 | ":libtint_core_src", |
| 763 | "${tint_spirv_tools_dir}/:spvtools_opt", |
| 764 | ] |
| 765 | |
| 766 | public_configs = [ "${tint_spirv_tools_dir}/:spvtools_internal_config" ] |
| 767 | } |
| 768 | |
| 769 | libtint_source_set("libtint_spv_writer_src") { |
| 770 | sources = [ |
| 771 | "writer/spirv/binary_writer.cc", |
| 772 | "writer/spirv/binary_writer.h", |
| 773 | "writer/spirv/builder.cc", |
| 774 | "writer/spirv/builder.h", |
| 775 | "writer/spirv/function.cc", |
| 776 | "writer/spirv/function.h", |
| 777 | "writer/spirv/generator.cc", |
| 778 | "writer/spirv/generator.h", |
Antonio Maiorano | b5c46c3 | 2022-04-11 21:10:20 +0000 | [diff] [blame] | 779 | "writer/spirv/generator_impl.cc", |
| 780 | "writer/spirv/generator_impl.h", |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 781 | "writer/spirv/instruction.cc", |
| 782 | "writer/spirv/instruction.h", |
| 783 | "writer/spirv/operand.cc", |
| 784 | "writer/spirv/operand.h", |
| 785 | "writer/spirv/scalar_constant.h", |
| 786 | ] |
| 787 | |
| 788 | public_deps = [ ":libtint_core_src" ] |
| 789 | } |
| 790 | |
| 791 | libtint_source_set("libtint_wgsl_reader_src") { |
| 792 | sources = [ |
| 793 | "reader/wgsl/lexer.cc", |
| 794 | "reader/wgsl/lexer.h", |
| 795 | "reader/wgsl/parser.cc", |
| 796 | "reader/wgsl/parser.h", |
| 797 | "reader/wgsl/parser_impl.cc", |
| 798 | "reader/wgsl/parser_impl.h", |
| 799 | "reader/wgsl/parser_impl_detail.h", |
| 800 | "reader/wgsl/token.cc", |
| 801 | "reader/wgsl/token.h", |
| 802 | ] |
| 803 | |
| 804 | public_deps = [ ":libtint_core_src" ] |
| 805 | } |
| 806 | |
| 807 | libtint_source_set("libtint_wgsl_writer_src") { |
| 808 | sources = [ |
| 809 | "writer/wgsl/generator.cc", |
| 810 | "writer/wgsl/generator.h", |
| 811 | "writer/wgsl/generator_impl.cc", |
| 812 | "writer/wgsl/generator_impl.h", |
| 813 | ] |
| 814 | |
| 815 | public_deps = [ ":libtint_core_src" ] |
| 816 | } |
| 817 | |
| 818 | libtint_source_set("libtint_msl_writer_src") { |
| 819 | sources = [ |
| 820 | "writer/msl/generator.cc", |
| 821 | "writer/msl/generator.h", |
| 822 | "writer/msl/generator_impl.cc", |
| 823 | "writer/msl/generator_impl.h", |
| 824 | ] |
| 825 | |
| 826 | public_deps = [ ":libtint_core_src" ] |
| 827 | } |
| 828 | |
| 829 | libtint_source_set("libtint_hlsl_writer_src") { |
| 830 | sources = [ |
| 831 | "writer/hlsl/generator.cc", |
| 832 | "writer/hlsl/generator.h", |
| 833 | "writer/hlsl/generator_impl.cc", |
| 834 | "writer/hlsl/generator_impl.h", |
| 835 | ] |
| 836 | |
| 837 | public_deps = [ ":libtint_core_src" ] |
| 838 | } |
| 839 | |
| 840 | libtint_source_set("libtint_glsl_writer_src") { |
| 841 | sources = [ |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 842 | "writer/glsl/generator.cc", |
| 843 | "writer/glsl/generator.h", |
| 844 | "writer/glsl/generator_impl.cc", |
| 845 | "writer/glsl/generator_impl.h", |
| 846 | ] |
| 847 | |
| 848 | public_deps = [ ":libtint_core_src" ] |
| 849 | } |
| 850 | |
dan sinclair | 6c5db2a | 2022-11-01 13:15:36 +0000 | [diff] [blame] | 851 | # Template to help invoke code generator for tint template files. |
| 852 | # |
| 853 | # Variables: |
| 854 | # input: The prefix for the template to generate, does not include the .tmpl extension |
| 855 | template("tint_intrinsic_generator") { |
| 856 | _sources = [ |
| 857 | "${invoker.input}.tmpl", |
| 858 | "${tint_root_dir}/src/tint/intrinsics.def", |
| 859 | ] |
| 860 | |
| 861 | _outputs = [ "${target_gen_dir}/${invoker.input}" ] |
| 862 | |
| 863 | _script = "${tint_root_dir}/generator/tint_gen_template.py" |
| 864 | _args = [ |
| 865 | "--output", |
| 866 | rebase_path(root_gen_dir), |
| 867 | "--template", |
| 868 | "src/tint/" + invoker.input + ".tmpl", |
| 869 | ] |
| 870 | |
| 871 | action("${target_name}") { |
| 872 | script = _script |
| 873 | outputs = _outputs |
| 874 | sources = _sources |
| 875 | args = _args |
| 876 | } |
| 877 | } |
| 878 | |
| 879 | # Template to help invoke code generator for tint template files for source files. By default this |
| 880 | # will generate a `h` and `cc` build rule for the provided `input` |
| 881 | # |
| 882 | # Variables: |
| 883 | # input: The prefix for the template, minus the file extension and .tmpl |
| 884 | # |
| 885 | # bench: set true to generate a bench template |
| 886 | # |
| 887 | # test: set true to generate a test template |
| 888 | template("tint_intrinsic_src_generator") { |
| 889 | tint_intrinsic_generator("${target_name}_h") { |
| 890 | input = "${invoker.input}.h" |
| 891 | } |
| 892 | tint_intrinsic_generator("${target_name}_cc") { |
| 893 | input = "${invoker.input}.cc" |
| 894 | } |
| 895 | |
| 896 | if (defined(invoker.bench) && invoker.bench) { |
| 897 | tint_intrinsic_generator("${target_name}_bench") { |
| 898 | input = "${invoker.input}_bench.cc" |
| 899 | } |
| 900 | } |
| 901 | if (defined(invoker.test) && invoker.test) { |
| 902 | tint_intrinsic_generator("${target_name}_test") { |
| 903 | input = "${invoker.input}_test.cc" |
| 904 | } |
| 905 | } |
| 906 | |
| 907 | source_set(target_name) { |
Dan Sinclair | 749abea | 2022-11-02 17:07:25 +0000 | [diff] [blame] | 908 | deps = [ |
dan sinclair | 6c5db2a | 2022-11-01 13:15:36 +0000 | [diff] [blame] | 909 | ":${target_name}_cc", |
| 910 | ":${target_name}_h", |
| 911 | ] |
| 912 | |
| 913 | if (defined(invoker.bench) && invoker.bench) { |
Dan Sinclair | 749abea | 2022-11-02 17:07:25 +0000 | [diff] [blame] | 914 | deps += [ ":${target_name}_bench" ] |
dan sinclair | 6c5db2a | 2022-11-01 13:15:36 +0000 | [diff] [blame] | 915 | } |
| 916 | if (defined(invoker.test) && invoker.test) { |
Dan Sinclair | 749abea | 2022-11-02 17:07:25 +0000 | [diff] [blame] | 917 | deps += [ ":${target_name}_test" ] |
dan sinclair | 6c5db2a | 2022-11-01 13:15:36 +0000 | [diff] [blame] | 918 | } |
| 919 | } |
| 920 | } |
| 921 | |
| 922 | tint_intrinsic_generator("tint_intrinsics_inl") { |
| 923 | input = "resolver/intrinsic_table.inl" |
| 924 | } |
| 925 | |
| 926 | tint_intrinsic_src_generator("tint_init_conv_intrinsic") { |
| 927 | input = "resolver/init_conv_intrinsic" |
| 928 | } |
| 929 | |
| 930 | tint_intrinsic_src_generator("tint_sem_builtin_type") { |
| 931 | input = "sem/builtin_type" |
| 932 | } |
| 933 | |
| 934 | tint_intrinsic_src_generator("tint_sem_parameter_usage") { |
| 935 | input = "sem/parameter_usage" |
| 936 | } |
| 937 | |
| 938 | tint_intrinsic_src_generator("tint_ast_extension") { |
| 939 | input = "ast/extension" |
| 940 | bench = true |
| 941 | test = true |
| 942 | } |
| 943 | |
| 944 | tint_intrinsic_src_generator("tint_ast_access") { |
| 945 | input = "ast/access" |
| 946 | } |
| 947 | |
| 948 | tint_intrinsic_src_generator("tint_ast_builtin_value") { |
| 949 | input = "ast/builtin_value" |
| 950 | bench = true |
| 951 | test = true |
| 952 | } |
| 953 | |
| 954 | tint_intrinsic_src_generator("tint_ast_texel_format") { |
| 955 | input = "ast/texel_format" |
| 956 | bench = true |
| 957 | test = true |
| 958 | } |
| 959 | |
| 960 | tint_intrinsic_src_generator("tint_ast_address_space") { |
| 961 | input = "ast/address_space" |
| 962 | bench = true |
| 963 | test = true |
| 964 | } |
| 965 | |
| 966 | tint_intrinsic_src_generator("tint_ast_interpolate_attribute") { |
| 967 | input = "ast/interpolate_attribute" |
| 968 | } |
| 969 | |
| 970 | libtint_source_set("tint_gen_deps") { |
Dan Sinclair | 749abea | 2022-11-02 17:07:25 +0000 | [diff] [blame] | 971 | deps = [ |
dan sinclair | 6c5db2a | 2022-11-01 13:15:36 +0000 | [diff] [blame] | 972 | ":tint_ast_access", |
| 973 | ":tint_ast_address_space", |
| 974 | ":tint_ast_builtin_value", |
| 975 | ":tint_ast_extension", |
| 976 | ":tint_ast_interpolate_attribute", |
| 977 | ":tint_ast_texel_format", |
| 978 | ":tint_init_conv_intrinsic", |
| 979 | ":tint_intrinsics_inl", |
| 980 | ":tint_sem_builtin_type", |
| 981 | ":tint_sem_parameter_usage", |
| 982 | ] |
| 983 | } |
| 984 | |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 985 | source_set("libtint") { |
| 986 | public_deps = [ ":libtint_core_src" ] |
| 987 | |
| 988 | if (tint_build_spv_reader) { |
| 989 | public_deps += [ ":libtint_spv_reader_src" ] |
| 990 | } |
| 991 | |
| 992 | if (tint_build_spv_writer) { |
| 993 | public_deps += [ ":libtint_spv_writer_src" ] |
| 994 | } |
| 995 | |
| 996 | if (tint_build_wgsl_reader) { |
| 997 | public_deps += [ ":libtint_wgsl_reader_src" ] |
| 998 | } |
| 999 | |
| 1000 | if (tint_build_wgsl_writer) { |
| 1001 | public_deps += [ ":libtint_wgsl_writer_src" ] |
| 1002 | } |
| 1003 | |
| 1004 | if (tint_build_msl_writer) { |
| 1005 | public_deps += [ ":libtint_msl_writer_src" ] |
| 1006 | } |
| 1007 | |
| 1008 | if (tint_build_hlsl_writer) { |
| 1009 | public_deps += [ ":libtint_hlsl_writer_src" ] |
| 1010 | } |
| 1011 | |
| 1012 | if (tint_build_glsl_writer) { |
| 1013 | public_deps += [ ":libtint_glsl_writer_src" ] |
| 1014 | } |
| 1015 | |
| 1016 | configs += [ ":tint_common_config" ] |
| 1017 | public_configs = [ ":tint_public_config" ] |
| 1018 | |
| 1019 | if (build_with_chromium) { |
| 1020 | configs -= [ "//build/config/compiler:chromium_code" ] |
| 1021 | configs += [ "//build/config/compiler:no_chromium_code" ] |
| 1022 | } |
| 1023 | } |
dan sinclair | 889a499 | 2022-06-17 13:01:59 +0000 | [diff] [blame] | 1024 | |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1025 | if (tint_build_unittests) { |
| 1026 | ############################################################################### |
| 1027 | # Gtest Gmock - Handle building inside and outside of Chromium. |
| 1028 | ############################################################################### |
| 1029 | # When building outside of Chromium we need to define our own targets for GTest |
| 1030 | # and GMock. However when compiling inside of Chromium we need to reuse the |
| 1031 | # existing targets, both because Chromium has a special harness for swarming |
| 1032 | # and because otherwise the "gn check" fails. |
dan sinclair | 889a499 | 2022-06-17 13:01:59 +0000 | [diff] [blame] | 1033 | |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1034 | if (!build_with_chromium) { |
| 1035 | # When we aren't in Chromium we define out own targets based on the location |
| 1036 | # of the googletest repo. |
| 1037 | config("gtest_config") { |
| 1038 | include_dirs = [ |
| 1039 | "${tint_googletest_dir}/googletest", |
| 1040 | "${tint_googletest_dir}/googletest/include", |
| 1041 | ] |
| 1042 | } |
| 1043 | static_library("gtest") { |
| 1044 | testonly = true |
| 1045 | sources = [ "${tint_googletest_dir}/googletest/src/gtest-all.cc" ] |
| 1046 | public_configs = [ ":gtest_config" ] |
| 1047 | } |
| 1048 | |
| 1049 | config("gmock_config") { |
| 1050 | include_dirs = [ |
| 1051 | "${tint_googletest_dir}/googlemock", |
| 1052 | "${tint_googletest_dir}/googlemock/include", |
| 1053 | "${tint_googletest_dir}/googletest/include", |
| 1054 | ] |
| 1055 | } |
| 1056 | |
| 1057 | static_library("gmock") { |
| 1058 | testonly = true |
| 1059 | sources = [ "${tint_googletest_dir}/googlemock/src/gmock-all.cc" ] |
| 1060 | public_configs = [ ":gmock_config" ] |
| 1061 | } |
| 1062 | |
| 1063 | group("gmock_and_gtest") { |
| 1064 | testonly = true |
| 1065 | public_deps = [ |
| 1066 | ":gmock", |
| 1067 | ":gtest", |
| 1068 | ] |
| 1069 | } |
| 1070 | } else { |
| 1071 | # When we are in Chromium we reuse its targets, and also add some deps that |
| 1072 | # are needed to launch the test in swarming mode. |
| 1073 | group("gmock_and_gtest") { |
| 1074 | testonly = true |
| 1075 | public_deps = [ |
| 1076 | "//base", |
| 1077 | "//base/test:test_support", |
| 1078 | "//testing/gmock", |
| 1079 | "//testing/gtest", |
| 1080 | "//third_party/googletest:gmock", |
| 1081 | ] |
| 1082 | } |
dan sinclair | 889a499 | 2022-06-17 13:01:59 +0000 | [diff] [blame] | 1083 | } |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1084 | |
| 1085 | ############################################################################### |
| 1086 | # Wrapping of Chromium targets |
| 1087 | ############################################################################### |
| 1088 | # These targets are separated because they are Chromium sources files that |
| 1089 | # can't use the tint_internal config, otherwise Tint's warning flags get |
| 1090 | # applied while compiling a bunch of Chromium's //base (via header inclusion) |
| 1091 | source_set("tint_unittests_main") { |
dan sinclair | 889a499 | 2022-06-17 13:01:59 +0000 | [diff] [blame] | 1092 | testonly = true |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1093 | deps = [ ":gmock_and_gtest" ] |
| 1094 | if (build_with_chromium) { |
| 1095 | sources = [ "//gpu/tint_unittests_main.cc" ] |
| 1096 | } else { |
| 1097 | sources = [ "test_main.cc" ] |
| 1098 | configs += [ ":tint_unittests_config" ] |
| 1099 | deps += [ |
| 1100 | ":libtint", |
| 1101 | ":tint_unittests_hlsl_writer_src", |
| 1102 | ":tint_unittests_msl_writer_src", |
| 1103 | ":tint_unittests_spv_reader_src", |
| 1104 | ] |
| 1105 | } |
dan sinclair | 889a499 | 2022-06-17 13:01:59 +0000 | [diff] [blame] | 1106 | } |
| 1107 | |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1108 | ############################################################################### |
| 1109 | # Tests - For libtint core and optional modules |
| 1110 | ############################################################################### |
| 1111 | config("tint_unittests_config") { |
dan sinclair | 889a499 | 2022-06-17 13:01:59 +0000 | [diff] [blame] | 1112 | include_dirs = [ |
dan sinclair | 889a499 | 2022-06-17 13:01:59 +0000 | [diff] [blame] | 1113 | "${tint_googletest_dir}/googlemock/include", |
| 1114 | "${tint_googletest_dir}/googletest/include", |
| 1115 | ] |
dan sinclair | 889a499 | 2022-06-17 13:01:59 +0000 | [diff] [blame] | 1116 | |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1117 | configs = [ |
| 1118 | ":tint_common_config", |
| 1119 | ":tint_public_config", |
dan sinclair | 889a499 | 2022-06-17 13:01:59 +0000 | [diff] [blame] | 1120 | ] |
| 1121 | } |
dan sinclair | 889a499 | 2022-06-17 13:01:59 +0000 | [diff] [blame] | 1122 | |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1123 | template("tint_unittests_source_set") { |
| 1124 | source_set(target_name) { |
| 1125 | forward_variables_from(invoker, "*", [ "configs" ]) |
dan sinclair | 889a499 | 2022-06-17 13:01:59 +0000 | [diff] [blame] | 1126 | |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1127 | if (defined(invoker.configs)) { |
| 1128 | configs += invoker.configs |
| 1129 | } |
| 1130 | configs += [ ":tint_unittests_config" ] |
| 1131 | if (build_with_chromium) { |
| 1132 | configs -= [ "//build/config/compiler:chromium_code" ] |
| 1133 | configs += [ "//build/config/compiler:no_chromium_code" ] |
| 1134 | } |
dan sinclair | 889a499 | 2022-06-17 13:01:59 +0000 | [diff] [blame] | 1135 | |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1136 | testonly = true |
dan sinclair | 889a499 | 2022-06-17 13:01:59 +0000 | [diff] [blame] | 1137 | |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1138 | if (!defined(invoker.deps)) { |
| 1139 | deps = [] |
| 1140 | } |
| 1141 | deps += [ |
| 1142 | ":gmock_and_gtest", |
| 1143 | ":libtint", |
| 1144 | ":tint_utils_io", |
| 1145 | ] |
dan sinclair | 889a499 | 2022-06-17 13:01:59 +0000 | [diff] [blame] | 1146 | } |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1147 | } |
| 1148 | |
| 1149 | tint_unittests_source_set("tint_unittests_ast_src") { |
| 1150 | sources = [ |
Dan Sinclair | 749abea | 2022-11-02 17:07:25 +0000 | [diff] [blame] | 1151 | "ast/address_space_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1152 | "ast/alias_test.cc", |
| 1153 | "ast/array_test.cc", |
| 1154 | "ast/assignment_statement_test.cc", |
| 1155 | "ast/atomic_test.cc", |
| 1156 | "ast/binary_expression_test.cc", |
| 1157 | "ast/binding_attribute_test.cc", |
| 1158 | "ast/bitcast_expression_test.cc", |
| 1159 | "ast/block_statement_test.cc", |
| 1160 | "ast/bool_literal_expression_test.cc", |
| 1161 | "ast/bool_test.cc", |
dan sinclair | b8b0c21 | 2022-10-20 22:45:50 +0000 | [diff] [blame] | 1162 | "ast/break_if_statement_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1163 | "ast/break_statement_test.cc", |
| 1164 | "ast/builtin_attribute_test.cc", |
| 1165 | "ast/builtin_texture_helper_test.cc", |
| 1166 | "ast/builtin_texture_helper_test.h", |
Dan Sinclair | 749abea | 2022-11-02 17:07:25 +0000 | [diff] [blame] | 1167 | "ast/builtin_value_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1168 | "ast/call_expression_test.cc", |
| 1169 | "ast/call_statement_test.cc", |
dan sinclair | f148f08 | 2022-10-19 15:55:02 +0000 | [diff] [blame] | 1170 | "ast/case_selector_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1171 | "ast/case_statement_test.cc", |
| 1172 | "ast/compound_assignment_statement_test.cc", |
| 1173 | "ast/continue_statement_test.cc", |
| 1174 | "ast/depth_multisampled_texture_test.cc", |
| 1175 | "ast/depth_texture_test.cc", |
| 1176 | "ast/discard_statement_test.cc", |
| 1177 | "ast/enable_test.cc", |
Dan Sinclair | 749abea | 2022-11-02 17:07:25 +0000 | [diff] [blame] | 1178 | "ast/extension_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1179 | "ast/external_texture_test.cc", |
| 1180 | "ast/f16_test.cc", |
| 1181 | "ast/f32_test.cc", |
| 1182 | "ast/fallthrough_statement_test.cc", |
| 1183 | "ast/float_literal_expression_test.cc", |
| 1184 | "ast/for_loop_statement_test.cc", |
| 1185 | "ast/function_test.cc", |
| 1186 | "ast/group_attribute_test.cc", |
| 1187 | "ast/i32_test.cc", |
| 1188 | "ast/id_attribute_test.cc", |
| 1189 | "ast/identifier_expression_test.cc", |
| 1190 | "ast/if_statement_test.cc", |
| 1191 | "ast/increment_decrement_statement_test.cc", |
| 1192 | "ast/index_accessor_expression_test.cc", |
| 1193 | "ast/int_literal_expression_test.cc", |
| 1194 | "ast/interpolate_attribute_test.cc", |
| 1195 | "ast/invariant_attribute_test.cc", |
| 1196 | "ast/location_attribute_test.cc", |
| 1197 | "ast/loop_statement_test.cc", |
| 1198 | "ast/matrix_test.cc", |
| 1199 | "ast/member_accessor_expression_test.cc", |
| 1200 | "ast/module_clone_test.cc", |
| 1201 | "ast/module_test.cc", |
| 1202 | "ast/multisampled_texture_test.cc", |
| 1203 | "ast/phony_expression_test.cc", |
| 1204 | "ast/pointer_test.cc", |
| 1205 | "ast/return_statement_test.cc", |
| 1206 | "ast/sampled_texture_test.cc", |
| 1207 | "ast/sampler_test.cc", |
| 1208 | "ast/stage_attribute_test.cc", |
Ben Clayton | bfd1a81 | 2022-08-02 23:16:25 +0000 | [diff] [blame] | 1209 | "ast/static_assert_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1210 | "ast/storage_texture_test.cc", |
| 1211 | "ast/stride_attribute_test.cc", |
| 1212 | "ast/struct_member_align_attribute_test.cc", |
| 1213 | "ast/struct_member_offset_attribute_test.cc", |
| 1214 | "ast/struct_member_size_attribute_test.cc", |
| 1215 | "ast/struct_member_test.cc", |
| 1216 | "ast/struct_test.cc", |
| 1217 | "ast/switch_statement_test.cc", |
| 1218 | "ast/test_helper.h", |
Dan Sinclair | 749abea | 2022-11-02 17:07:25 +0000 | [diff] [blame] | 1219 | "ast/texel_format_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1220 | "ast/texture_test.cc", |
| 1221 | "ast/traverse_expressions_test.cc", |
| 1222 | "ast/u32_test.cc", |
| 1223 | "ast/unary_op_expression_test.cc", |
| 1224 | "ast/variable_decl_statement_test.cc", |
| 1225 | "ast/variable_test.cc", |
| 1226 | "ast/vector_test.cc", |
| 1227 | "ast/while_statement_test.cc", |
| 1228 | "ast/workgroup_attribute_test.cc", |
| 1229 | ] |
| 1230 | } |
| 1231 | |
| 1232 | tint_unittests_source_set("tint_unittests_diagnostic_src") { |
| 1233 | sources = [ |
| 1234 | "diagnostic/diagnostic_test.cc", |
| 1235 | "diagnostic/formatter_test.cc", |
| 1236 | "diagnostic/printer_test.cc", |
| 1237 | ] |
| 1238 | } |
| 1239 | |
| 1240 | tint_unittests_source_set("tint_unittests_inspector_src") { |
| 1241 | sources = [ |
| 1242 | "inspector/inspector_test.cc", |
| 1243 | "inspector/test_inspector_builder.cc", |
| 1244 | "inspector/test_inspector_builder.h", |
| 1245 | "inspector/test_inspector_runner.cc", |
| 1246 | "inspector/test_inspector_runner.h", |
| 1247 | ] |
| 1248 | } |
| 1249 | |
| 1250 | tint_unittests_source_set("tint_unittests_resolver_src") { |
| 1251 | sources = [ |
dan sinclair | ff7cf21 | 2022-10-03 14:05:23 +0000 | [diff] [blame] | 1252 | "resolver/address_space_layout_validation_test.cc", |
| 1253 | "resolver/address_space_validation_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1254 | "resolver/array_accessor_test.cc", |
| 1255 | "resolver/assignment_validation_test.cc", |
| 1256 | "resolver/atomics_test.cc", |
| 1257 | "resolver/atomics_validation_test.cc", |
| 1258 | "resolver/attribute_validation_test.cc", |
| 1259 | "resolver/bitcast_validation_test.cc", |
| 1260 | "resolver/builtin_test.cc", |
| 1261 | "resolver/builtin_validation_test.cc", |
| 1262 | "resolver/builtins_validation_test.cc", |
| 1263 | "resolver/call_test.cc", |
| 1264 | "resolver/call_validation_test.cc", |
| 1265 | "resolver/compound_assignment_validation_test.cc", |
| 1266 | "resolver/compound_statement_test.cc", |
Antonio Maiorano | 723da2a | 2022-10-13 19:27:30 +0000 | [diff] [blame] | 1267 | "resolver/const_eval_binary_op_test.cc", |
| 1268 | "resolver/const_eval_builtin_test.cc", |
| 1269 | "resolver/const_eval_construction_test.cc", |
| 1270 | "resolver/const_eval_conversion_test.cc", |
| 1271 | "resolver/const_eval_indexing_test.cc", |
| 1272 | "resolver/const_eval_member_access_test.cc", |
| 1273 | "resolver/const_eval_test.h", |
| 1274 | "resolver/const_eval_unary_op_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1275 | "resolver/control_block_validation_test.cc", |
| 1276 | "resolver/dependency_graph_test.cc", |
| 1277 | "resolver/entry_point_validation_test.cc", |
Ben Clayton | 83bd738 | 2022-07-15 23:46:31 +0000 | [diff] [blame] | 1278 | "resolver/evaluation_stage_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1279 | "resolver/function_validation_test.cc", |
| 1280 | "resolver/host_shareable_validation_test.cc", |
| 1281 | "resolver/increment_decrement_validation_test.cc", |
Ben Clayton | 783b169 | 2022-08-02 17:03:35 +0000 | [diff] [blame] | 1282 | "resolver/inferred_type_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1283 | "resolver/intrinsic_table_test.cc", |
| 1284 | "resolver/is_host_shareable_test.cc", |
| 1285 | "resolver/is_storeable_test.cc", |
| 1286 | "resolver/materialize_test.cc", |
Ben Clayton | 9a6acc4 | 2022-07-27 20:50:40 +0000 | [diff] [blame] | 1287 | "resolver/override_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1288 | "resolver/ptr_ref_test.cc", |
| 1289 | "resolver/ptr_ref_validation_test.cc", |
| 1290 | "resolver/resolver_behavior_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1291 | "resolver/resolver_test.cc", |
| 1292 | "resolver/resolver_test_helper.cc", |
| 1293 | "resolver/resolver_test_helper.h", |
| 1294 | "resolver/side_effects_test.cc", |
| 1295 | "resolver/source_variable_test.cc", |
dan sinclair | 1cd4706 | 2022-08-05 14:53:47 +0000 | [diff] [blame] | 1296 | "resolver/static_assert_test.cc", |
dan sinclair | ff7cf21 | 2022-10-03 14:05:23 +0000 | [diff] [blame] | 1297 | "resolver/struct_address_space_use_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1298 | "resolver/struct_layout_test.cc", |
| 1299 | "resolver/struct_pipeline_stage_use_test.cc", |
dan sinclair | 6e77b47 | 2022-10-20 13:38:28 +0000 | [diff] [blame] | 1300 | "resolver/type_initializer_validation_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1301 | "resolver/type_validation_test.cc", |
| 1302 | "resolver/uniformity_test.cc", |
| 1303 | "resolver/validation_test.cc", |
| 1304 | "resolver/validator_is_storeable_test.cc", |
Ben Clayton | 68ae36e | 2022-06-24 21:26:39 +0000 | [diff] [blame] | 1305 | "resolver/variable_test.cc", |
| 1306 | "resolver/variable_validation_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1307 | ] |
| 1308 | deps = [ ":tint_unittests_ast_src" ] |
| 1309 | } |
| 1310 | |
| 1311 | tint_unittests_source_set("tint_unittests_sem_src") { |
| 1312 | sources = [ |
Ben Clayton | df3a046 | 2022-10-17 13:24:38 +0000 | [diff] [blame] | 1313 | "sem/array_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1314 | "sem/atomic_test.cc", |
| 1315 | "sem/bool_test.cc", |
| 1316 | "sem/builtin_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1317 | "sem/depth_multisampled_texture_test.cc", |
| 1318 | "sem/depth_texture_test.cc", |
| 1319 | "sem/expression_test.cc", |
| 1320 | "sem/external_texture_test.cc", |
| 1321 | "sem/f16_test.cc", |
| 1322 | "sem/f32_test.cc", |
| 1323 | "sem/i32_test.cc", |
| 1324 | "sem/matrix_test.cc", |
| 1325 | "sem/multisampled_texture_test.cc", |
| 1326 | "sem/pointer_test.cc", |
| 1327 | "sem/reference_test.cc", |
| 1328 | "sem/sampled_texture_test.cc", |
| 1329 | "sem/sampler_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1330 | "sem/storage_texture_test.cc", |
Ben Clayton | df3a046 | 2022-10-17 13:24:38 +0000 | [diff] [blame] | 1331 | "sem/struct_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1332 | "sem/texture_test.cc", |
| 1333 | "sem/type_manager_test.cc", |
| 1334 | "sem/type_test.cc", |
| 1335 | "sem/u32_test.cc", |
| 1336 | "sem/vector_test.cc", |
| 1337 | ] |
| 1338 | } |
| 1339 | |
| 1340 | tint_unittests_source_set("tint_unittests_text_src") { |
| 1341 | sources = [ "text/unicode_test.cc" ] |
| 1342 | } |
| 1343 | |
| 1344 | tint_unittests_source_set("tint_unittests_transform_src") { |
| 1345 | sources = [ |
Stephen White | 863d9ed | 2022-09-02 19:19:10 +0000 | [diff] [blame] | 1346 | "transform/add_block_attribute_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1347 | "transform/add_empty_entry_point_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1348 | "transform/array_length_from_uniform_test.cc", |
| 1349 | "transform/binding_remapper_test.cc", |
| 1350 | "transform/builtin_polyfill_test.cc", |
| 1351 | "transform/calculate_array_length_test.cc", |
| 1352 | "transform/canonicalize_entry_point_io_test.cc", |
Corentin Wallez | 98a7cd1 | 2022-10-11 09:52:25 +0000 | [diff] [blame] | 1353 | "transform/clamp_frag_depth_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1354 | "transform/combine_samplers_test.cc", |
| 1355 | "transform/decompose_memory_access_test.cc", |
| 1356 | "transform/decompose_strided_array_test.cc", |
| 1357 | "transform/decompose_strided_matrix_test.cc", |
| 1358 | "transform/disable_uniformity_analysis_test.cc", |
| 1359 | "transform/expand_compound_assignment_test.cc", |
| 1360 | "transform/first_index_offset_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1361 | "transform/for_loop_to_loop_test.cc", |
| 1362 | "transform/localize_struct_array_assignment_test.cc", |
James Price | 5de8b43 | 2022-10-31 14:49:03 +0000 | [diff] [blame] | 1363 | "transform/merge_return_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1364 | "transform/module_scope_var_to_entry_point_param_test.cc", |
| 1365 | "transform/multiplanar_external_texture_test.cc", |
| 1366 | "transform/num_workgroups_from_uniform_test.cc", |
Ben Clayton | a92f425 | 2022-10-27 14:36:49 +0000 | [diff] [blame] | 1367 | "transform/packed_vec3_test.cc", |
Stephen White | 05d8b02 | 2022-09-13 19:48:51 +0000 | [diff] [blame] | 1368 | "transform/pad_structs_test.cc", |
Ben Clayton | 7ebcfc7 | 2022-06-27 20:20:25 +0000 | [diff] [blame] | 1369 | "transform/promote_initializers_to_let_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1370 | "transform/promote_side_effects_to_decl_test.cc", |
| 1371 | "transform/remove_continue_in_switch_test.cc", |
| 1372 | "transform/remove_phonies_test.cc", |
| 1373 | "transform/remove_unreachable_statements_test.cc", |
| 1374 | "transform/renamer_test.cc", |
| 1375 | "transform/robustness_test.cc", |
| 1376 | "transform/simplify_pointers_test.cc", |
| 1377 | "transform/single_entry_point_test.cc", |
Antonio Maiorano | 268d7b8 | 2022-06-24 22:28:23 +0000 | [diff] [blame] | 1378 | "transform/spirv_atomic_test.cc", |
Zhaoming Jiang | 5cbb32d | 2022-10-11 07:55:00 +0000 | [diff] [blame] | 1379 | "transform/std140_exhaustive_test.cc", |
Ben Clayton | 657e61d | 2022-09-01 22:12:19 +0000 | [diff] [blame] | 1380 | "transform/std140_test.cc", |
dan sinclair | 256f111 | 2022-07-22 16:05:06 +0000 | [diff] [blame] | 1381 | "transform/substitute_override_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1382 | "transform/test_helper.h", |
| 1383 | "transform/transform_test.cc", |
| 1384 | "transform/unshadow_test.cc", |
| 1385 | "transform/unwind_discard_functions_test.cc", |
| 1386 | "transform/utils/get_insertion_point_test.cc", |
| 1387 | "transform/utils/hoist_to_decl_before_test.cc", |
| 1388 | "transform/var_for_dynamic_index_test.cc", |
Zhaoming Jiang | 426b47e | 2022-09-01 03:08:20 +0000 | [diff] [blame] | 1389 | "transform/vectorize_matrix_conversions_test.cc", |
dan sinclair | 6e77b47 | 2022-10-20 13:38:28 +0000 | [diff] [blame] | 1390 | "transform/vectorize_scalar_matrix_initializers_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1391 | "transform/vertex_pulling_test.cc", |
| 1392 | "transform/while_to_loop_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1393 | "transform/zero_init_workgroup_memory_test.cc", |
| 1394 | ] |
| 1395 | } |
| 1396 | |
| 1397 | tint_unittests_source_set("tint_unittests_utils_src") { |
| 1398 | sources = [ |
| 1399 | "utils/bitcast_test.cc", |
Ben Clayton | e43034b | 2022-07-21 23:32:24 +0000 | [diff] [blame] | 1400 | "utils/bitset_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1401 | "utils/crc32_test.cc", |
| 1402 | "utils/defer_test.cc", |
| 1403 | "utils/enum_set_test.cc", |
| 1404 | "utils/hash_test.cc", |
Ben Clayton | e13160e | 2022-08-17 16:28:23 +0000 | [diff] [blame] | 1405 | "utils/hashmap_test.cc", |
| 1406 | "utils/hashset_test.cc", |
dan sinclair | ff2cb02 | 2022-08-18 14:37:17 +0000 | [diff] [blame] | 1407 | "utils/io/command_test.cc", |
| 1408 | "utils/io/tmpfile_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1409 | "utils/map_test.cc", |
| 1410 | "utils/math_test.cc", |
| 1411 | "utils/result_test.cc", |
| 1412 | "utils/reverse_test.cc", |
| 1413 | "utils/scoped_assignment_test.cc", |
| 1414 | "utils/string_test.cc", |
| 1415 | "utils/transform_test.cc", |
| 1416 | "utils/unique_allocator_test.cc", |
| 1417 | "utils/unique_vector_test.cc", |
Ben Clayton | 3bc20e3 | 2022-07-21 19:34:05 +0000 | [diff] [blame] | 1418 | "utils/vector_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1419 | ] |
| 1420 | } |
| 1421 | |
| 1422 | tint_unittests_source_set("tint_unittests_writer_src") { |
| 1423 | sources = [ |
| 1424 | "writer/append_vector_test.cc", |
Ben Clayton | 1a56778 | 2022-10-14 13:38:27 +0000 | [diff] [blame] | 1425 | "writer/check_supported_extensions_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1426 | "writer/flatten_bindings_test.cc", |
| 1427 | "writer/float_to_string_test.cc", |
| 1428 | "writer/generate_external_texture_bindings_test.cc", |
| 1429 | "writer/text_generator_test.cc", |
| 1430 | ] |
| 1431 | } |
| 1432 | |
| 1433 | tint_unittests_source_set("tint_unittests_spv_reader_src") { |
| 1434 | sources = [ |
| 1435 | "reader/spirv/enum_converter_test.cc", |
| 1436 | "reader/spirv/fail_stream_test.cc", |
| 1437 | "reader/spirv/function_arithmetic_test.cc", |
| 1438 | "reader/spirv/function_bit_test.cc", |
| 1439 | "reader/spirv/function_call_test.cc", |
| 1440 | "reader/spirv/function_cfg_test.cc", |
| 1441 | "reader/spirv/function_composite_test.cc", |
| 1442 | "reader/spirv/function_conversion_test.cc", |
| 1443 | "reader/spirv/function_decl_test.cc", |
| 1444 | "reader/spirv/function_glsl_std_450_test.cc", |
| 1445 | "reader/spirv/function_logical_test.cc", |
| 1446 | "reader/spirv/function_memory_test.cc", |
| 1447 | "reader/spirv/function_misc_test.cc", |
| 1448 | "reader/spirv/function_var_test.cc", |
| 1449 | "reader/spirv/namer_test.cc", |
| 1450 | "reader/spirv/parser_impl_barrier_test.cc", |
| 1451 | "reader/spirv/parser_impl_convert_member_decoration_test.cc", |
| 1452 | "reader/spirv/parser_impl_convert_type_test.cc", |
| 1453 | "reader/spirv/parser_impl_function_decl_test.cc", |
| 1454 | "reader/spirv/parser_impl_get_decorations_test.cc", |
| 1455 | "reader/spirv/parser_impl_handle_test.cc", |
| 1456 | "reader/spirv/parser_impl_import_test.cc", |
| 1457 | "reader/spirv/parser_impl_module_var_test.cc", |
| 1458 | "reader/spirv/parser_impl_named_types_test.cc", |
| 1459 | "reader/spirv/parser_impl_test.cc", |
| 1460 | "reader/spirv/parser_impl_test_helper.cc", |
| 1461 | "reader/spirv/parser_impl_test_helper.h", |
| 1462 | "reader/spirv/parser_impl_user_name_test.cc", |
| 1463 | "reader/spirv/parser_test.cc", |
| 1464 | "reader/spirv/parser_type_test.cc", |
| 1465 | "reader/spirv/spirv_tools_helpers_test.cc", |
| 1466 | "reader/spirv/spirv_tools_helpers_test.h", |
| 1467 | "reader/spirv/usage_test.cc", |
| 1468 | ] |
| 1469 | |
| 1470 | deps = [ ":libtint_spv_reader_src" ] |
| 1471 | } |
| 1472 | |
| 1473 | tint_unittests_source_set("tint_unittests_spv_writer_src") { |
| 1474 | sources = [ |
| 1475 | "writer/spirv/binary_writer_test.cc", |
| 1476 | "writer/spirv/builder_accessor_expression_test.cc", |
| 1477 | "writer/spirv/builder_assign_test.cc", |
| 1478 | "writer/spirv/builder_binary_expression_test.cc", |
| 1479 | "writer/spirv/builder_bitcast_expression_test.cc", |
| 1480 | "writer/spirv/builder_block_test.cc", |
| 1481 | "writer/spirv/builder_builtin_test.cc", |
| 1482 | "writer/spirv/builder_builtin_texture_test.cc", |
| 1483 | "writer/spirv/builder_call_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1484 | "writer/spirv/builder_discard_test.cc", |
| 1485 | "writer/spirv/builder_entry_point_test.cc", |
| 1486 | "writer/spirv/builder_format_conversion_test.cc", |
| 1487 | "writer/spirv/builder_function_attribute_test.cc", |
| 1488 | "writer/spirv/builder_function_test.cc", |
| 1489 | "writer/spirv/builder_function_variable_test.cc", |
| 1490 | "writer/spirv/builder_global_variable_test.cc", |
| 1491 | "writer/spirv/builder_ident_expression_test.cc", |
| 1492 | "writer/spirv/builder_if_test.cc", |
dan sinclair | 6e77b47 | 2022-10-20 13:38:28 +0000 | [diff] [blame] | 1493 | "writer/spirv/builder_initializer_expression_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1494 | "writer/spirv/builder_literal_test.cc", |
| 1495 | "writer/spirv/builder_loop_test.cc", |
| 1496 | "writer/spirv/builder_return_test.cc", |
Ben Clayton | b4744ac | 2022-08-03 07:01:08 +0000 | [diff] [blame] | 1497 | "writer/spirv/builder_static_assert_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1498 | "writer/spirv/builder_switch_test.cc", |
| 1499 | "writer/spirv/builder_test.cc", |
| 1500 | "writer/spirv/builder_type_test.cc", |
| 1501 | "writer/spirv/builder_unary_op_expression_test.cc", |
| 1502 | "writer/spirv/instruction_test.cc", |
| 1503 | "writer/spirv/operand_test.cc", |
| 1504 | "writer/spirv/scalar_constant_test.cc", |
| 1505 | "writer/spirv/spv_dump.cc", |
| 1506 | "writer/spirv/spv_dump.h", |
| 1507 | "writer/spirv/test_helper.h", |
| 1508 | ] |
| 1509 | |
| 1510 | deps = [ |
| 1511 | ":libtint_spv_writer_src", |
| 1512 | ":tint_unittests_ast_src", |
| 1513 | "${tint_spirv_tools_dir}/:spvtools", |
| 1514 | ] |
| 1515 | } |
| 1516 | |
| 1517 | tint_unittests_source_set("tint_unittests_wgsl_reader_src") { |
| 1518 | sources = [ |
| 1519 | "reader/wgsl/lexer_test.cc", |
| 1520 | "reader/wgsl/parser_impl_additive_expression_test.cc", |
dan sinclair | ff7cf21 | 2022-10-03 14:05:23 +0000 | [diff] [blame] | 1521 | "reader/wgsl/parser_impl_address_space_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1522 | "reader/wgsl/parser_impl_argument_expression_list_test.cc", |
| 1523 | "reader/wgsl/parser_impl_assignment_stmt_test.cc", |
dan sinclair | ff2cb02 | 2022-08-18 14:37:17 +0000 | [diff] [blame] | 1524 | "reader/wgsl/parser_impl_bitwise_expression_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1525 | "reader/wgsl/parser_impl_break_stmt_test.cc", |
| 1526 | "reader/wgsl/parser_impl_bug_cases_test.cc", |
| 1527 | "reader/wgsl/parser_impl_call_stmt_test.cc", |
dan sinclair | 393de08 | 2022-08-22 16:15:04 +0000 | [diff] [blame] | 1528 | "reader/wgsl/parser_impl_callable_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1529 | "reader/wgsl/parser_impl_case_body_test.cc", |
dan sinclair | 1cd4706 | 2022-08-05 14:53:47 +0000 | [diff] [blame] | 1530 | "reader/wgsl/parser_impl_compound_stmt_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1531 | "reader/wgsl/parser_impl_const_literal_test.cc", |
| 1532 | "reader/wgsl/parser_impl_continue_stmt_test.cc", |
| 1533 | "reader/wgsl/parser_impl_continuing_stmt_test.cc", |
dan sinclair | 6c8dc15 | 2022-08-17 16:30:30 +0000 | [diff] [blame] | 1534 | "reader/wgsl/parser_impl_core_lhs_expression_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1535 | "reader/wgsl/parser_impl_depth_texture_test.cc", |
dan sinclair | 2788bec | 2022-08-19 21:26:01 +0000 | [diff] [blame] | 1536 | "reader/wgsl/parser_impl_element_count_expression_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1537 | "reader/wgsl/parser_impl_enable_directive_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1538 | "reader/wgsl/parser_impl_error_msg_test.cc", |
| 1539 | "reader/wgsl/parser_impl_error_resync_test.cc", |
dan sinclair | ee25586 | 2022-08-22 14:06:44 +0000 | [diff] [blame] | 1540 | "reader/wgsl/parser_impl_expression_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1541 | "reader/wgsl/parser_impl_external_texture_test.cc", |
| 1542 | "reader/wgsl/parser_impl_for_stmt_test.cc", |
| 1543 | "reader/wgsl/parser_impl_function_attribute_list_test.cc", |
| 1544 | "reader/wgsl/parser_impl_function_attribute_test.cc", |
| 1545 | "reader/wgsl/parser_impl_function_decl_test.cc", |
| 1546 | "reader/wgsl/parser_impl_function_header_test.cc", |
| 1547 | "reader/wgsl/parser_impl_global_constant_decl_test.cc", |
| 1548 | "reader/wgsl/parser_impl_global_decl_test.cc", |
| 1549 | "reader/wgsl/parser_impl_global_variable_decl_test.cc", |
| 1550 | "reader/wgsl/parser_impl_if_stmt_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1551 | "reader/wgsl/parser_impl_increment_decrement_stmt_test.cc", |
dan sinclair | 6c8dc15 | 2022-08-17 16:30:30 +0000 | [diff] [blame] | 1552 | "reader/wgsl/parser_impl_lhs_expression_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1553 | "reader/wgsl/parser_impl_loop_stmt_test.cc", |
dan sinclair | 2788bec | 2022-08-19 21:26:01 +0000 | [diff] [blame] | 1554 | "reader/wgsl/parser_impl_math_expression_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1555 | "reader/wgsl/parser_impl_multiplicative_expression_test.cc", |
| 1556 | "reader/wgsl/parser_impl_param_list_test.cc", |
dan sinclair | 05288f6 | 2022-07-22 16:07:36 +0000 | [diff] [blame] | 1557 | "reader/wgsl/parser_impl_paren_expression_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1558 | "reader/wgsl/parser_impl_pipeline_stage_test.cc", |
| 1559 | "reader/wgsl/parser_impl_primary_expression_test.cc", |
| 1560 | "reader/wgsl/parser_impl_relational_expression_test.cc", |
| 1561 | "reader/wgsl/parser_impl_reserved_keyword_test.cc", |
| 1562 | "reader/wgsl/parser_impl_sampled_texture_test.cc", |
| 1563 | "reader/wgsl/parser_impl_sampler_test.cc", |
| 1564 | "reader/wgsl/parser_impl_shift_expression_test.cc", |
| 1565 | "reader/wgsl/parser_impl_singular_expression_test.cc", |
| 1566 | "reader/wgsl/parser_impl_statement_test.cc", |
| 1567 | "reader/wgsl/parser_impl_statements_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1568 | "reader/wgsl/parser_impl_storage_texture_test.cc", |
| 1569 | "reader/wgsl/parser_impl_struct_attribute_decl_test.cc", |
| 1570 | "reader/wgsl/parser_impl_struct_body_decl_test.cc", |
| 1571 | "reader/wgsl/parser_impl_struct_decl_test.cc", |
| 1572 | "reader/wgsl/parser_impl_struct_member_attribute_decl_test.cc", |
| 1573 | "reader/wgsl/parser_impl_struct_member_attribute_test.cc", |
| 1574 | "reader/wgsl/parser_impl_struct_member_test.cc", |
| 1575 | "reader/wgsl/parser_impl_switch_body_test.cc", |
| 1576 | "reader/wgsl/parser_impl_switch_stmt_test.cc", |
| 1577 | "reader/wgsl/parser_impl_test.cc", |
| 1578 | "reader/wgsl/parser_impl_test_helper.cc", |
| 1579 | "reader/wgsl/parser_impl_test_helper.h", |
| 1580 | "reader/wgsl/parser_impl_texel_format_test.cc", |
| 1581 | "reader/wgsl/parser_impl_texture_sampler_test.cc", |
| 1582 | "reader/wgsl/parser_impl_type_alias_test.cc", |
| 1583 | "reader/wgsl/parser_impl_type_decl_test.cc", |
dan sinclair | 393de08 | 2022-08-22 16:15:04 +0000 | [diff] [blame] | 1584 | "reader/wgsl/parser_impl_type_decl_without_ident_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1585 | "reader/wgsl/parser_impl_unary_expression_test.cc", |
| 1586 | "reader/wgsl/parser_impl_variable_attribute_list_test.cc", |
| 1587 | "reader/wgsl/parser_impl_variable_attribute_test.cc", |
| 1588 | "reader/wgsl/parser_impl_variable_decl_test.cc", |
| 1589 | "reader/wgsl/parser_impl_variable_ident_decl_test.cc", |
| 1590 | "reader/wgsl/parser_impl_variable_qualifier_test.cc", |
| 1591 | "reader/wgsl/parser_impl_variable_stmt_test.cc", |
dan sinclair | 393de08 | 2022-08-22 16:15:04 +0000 | [diff] [blame] | 1592 | "reader/wgsl/parser_impl_vec_mat_prefix_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1593 | "reader/wgsl/parser_impl_while_stmt_test.cc", |
| 1594 | "reader/wgsl/parser_test.cc", |
| 1595 | "reader/wgsl/token_test.cc", |
| 1596 | ] |
| 1597 | |
| 1598 | deps = [ ":libtint_wgsl_reader_src" ] |
| 1599 | } |
| 1600 | |
| 1601 | tint_unittests_source_set("tint_unittests_wgsl_writer_src") { |
| 1602 | sources = [ |
| 1603 | "writer/wgsl/generator_impl_alias_type_test.cc", |
| 1604 | "writer/wgsl/generator_impl_array_accessor_test.cc", |
| 1605 | "writer/wgsl/generator_impl_assign_test.cc", |
| 1606 | "writer/wgsl/generator_impl_binary_test.cc", |
| 1607 | "writer/wgsl/generator_impl_bitcast_test.cc", |
| 1608 | "writer/wgsl/generator_impl_block_test.cc", |
| 1609 | "writer/wgsl/generator_impl_break_test.cc", |
| 1610 | "writer/wgsl/generator_impl_call_test.cc", |
| 1611 | "writer/wgsl/generator_impl_case_test.cc", |
| 1612 | "writer/wgsl/generator_impl_cast_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1613 | "writer/wgsl/generator_impl_continue_test.cc", |
| 1614 | "writer/wgsl/generator_impl_discard_test.cc", |
| 1615 | "writer/wgsl/generator_impl_enable_test.cc", |
| 1616 | "writer/wgsl/generator_impl_fallthrough_test.cc", |
| 1617 | "writer/wgsl/generator_impl_function_test.cc", |
| 1618 | "writer/wgsl/generator_impl_global_decl_test.cc", |
| 1619 | "writer/wgsl/generator_impl_identifier_test.cc", |
| 1620 | "writer/wgsl/generator_impl_if_test.cc", |
dan sinclair | 6e77b47 | 2022-10-20 13:38:28 +0000 | [diff] [blame] | 1621 | "writer/wgsl/generator_impl_initializer_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1622 | "writer/wgsl/generator_impl_literal_test.cc", |
| 1623 | "writer/wgsl/generator_impl_loop_test.cc", |
| 1624 | "writer/wgsl/generator_impl_member_accessor_test.cc", |
| 1625 | "writer/wgsl/generator_impl_return_test.cc", |
Ben Clayton | b4744ac | 2022-08-03 07:01:08 +0000 | [diff] [blame] | 1626 | "writer/wgsl/generator_impl_static_assert_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1627 | "writer/wgsl/generator_impl_switch_test.cc", |
| 1628 | "writer/wgsl/generator_impl_test.cc", |
| 1629 | "writer/wgsl/generator_impl_type_test.cc", |
| 1630 | "writer/wgsl/generator_impl_unary_op_test.cc", |
| 1631 | "writer/wgsl/generator_impl_variable_decl_statement_test.cc", |
| 1632 | "writer/wgsl/generator_impl_variable_test.cc", |
| 1633 | "writer/wgsl/test_helper.h", |
| 1634 | ] |
| 1635 | |
| 1636 | deps = [ |
| 1637 | ":libtint_wgsl_writer_src", |
| 1638 | ":tint_unittests_ast_src", |
| 1639 | ] |
| 1640 | } |
| 1641 | |
| 1642 | tint_unittests_source_set("tint_unittests_msl_writer_src") { |
| 1643 | sources = [ |
| 1644 | "writer/msl/generator_impl_array_accessor_test.cc", |
| 1645 | "writer/msl/generator_impl_assign_test.cc", |
| 1646 | "writer/msl/generator_impl_binary_test.cc", |
| 1647 | "writer/msl/generator_impl_bitcast_test.cc", |
| 1648 | "writer/msl/generator_impl_block_test.cc", |
| 1649 | "writer/msl/generator_impl_break_test.cc", |
| 1650 | "writer/msl/generator_impl_builtin_test.cc", |
| 1651 | "writer/msl/generator_impl_builtin_texture_test.cc", |
| 1652 | "writer/msl/generator_impl_call_test.cc", |
| 1653 | "writer/msl/generator_impl_case_test.cc", |
| 1654 | "writer/msl/generator_impl_cast_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1655 | "writer/msl/generator_impl_continue_test.cc", |
| 1656 | "writer/msl/generator_impl_discard_test.cc", |
| 1657 | "writer/msl/generator_impl_function_test.cc", |
| 1658 | "writer/msl/generator_impl_identifier_test.cc", |
| 1659 | "writer/msl/generator_impl_if_test.cc", |
| 1660 | "writer/msl/generator_impl_import_test.cc", |
dan sinclair | 6e77b47 | 2022-10-20 13:38:28 +0000 | [diff] [blame] | 1661 | "writer/msl/generator_impl_initializer_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1662 | "writer/msl/generator_impl_loop_test.cc", |
| 1663 | "writer/msl/generator_impl_member_accessor_test.cc", |
| 1664 | "writer/msl/generator_impl_module_constant_test.cc", |
| 1665 | "writer/msl/generator_impl_return_test.cc", |
| 1666 | "writer/msl/generator_impl_sanitizer_test.cc", |
Ben Clayton | b4744ac | 2022-08-03 07:01:08 +0000 | [diff] [blame] | 1667 | "writer/msl/generator_impl_static_assert_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1668 | "writer/msl/generator_impl_switch_test.cc", |
| 1669 | "writer/msl/generator_impl_test.cc", |
| 1670 | "writer/msl/generator_impl_type_test.cc", |
| 1671 | "writer/msl/generator_impl_unary_op_test.cc", |
| 1672 | "writer/msl/generator_impl_variable_decl_statement_test.cc", |
| 1673 | "writer/msl/test_helper.h", |
| 1674 | ] |
| 1675 | |
| 1676 | deps = [ |
| 1677 | ":libtint_msl_writer_src", |
| 1678 | ":tint_unittests_ast_src", |
| 1679 | ] |
| 1680 | } |
| 1681 | |
| 1682 | tint_unittests_source_set("tint_unittests_hlsl_writer_src") { |
| 1683 | sources = [ |
| 1684 | "writer/hlsl/generator_impl_array_accessor_test.cc", |
| 1685 | "writer/hlsl/generator_impl_assign_test.cc", |
| 1686 | "writer/hlsl/generator_impl_binary_test.cc", |
| 1687 | "writer/hlsl/generator_impl_bitcast_test.cc", |
| 1688 | "writer/hlsl/generator_impl_block_test.cc", |
| 1689 | "writer/hlsl/generator_impl_break_test.cc", |
| 1690 | "writer/hlsl/generator_impl_builtin_test.cc", |
| 1691 | "writer/hlsl/generator_impl_builtin_texture_test.cc", |
| 1692 | "writer/hlsl/generator_impl_call_test.cc", |
| 1693 | "writer/hlsl/generator_impl_case_test.cc", |
| 1694 | "writer/hlsl/generator_impl_cast_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1695 | "writer/hlsl/generator_impl_continue_test.cc", |
| 1696 | "writer/hlsl/generator_impl_discard_test.cc", |
| 1697 | "writer/hlsl/generator_impl_function_test.cc", |
| 1698 | "writer/hlsl/generator_impl_identifier_test.cc", |
| 1699 | "writer/hlsl/generator_impl_if_test.cc", |
| 1700 | "writer/hlsl/generator_impl_import_test.cc", |
dan sinclair | 6e77b47 | 2022-10-20 13:38:28 +0000 | [diff] [blame] | 1701 | "writer/hlsl/generator_impl_initializer_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1702 | "writer/hlsl/generator_impl_loop_test.cc", |
| 1703 | "writer/hlsl/generator_impl_member_accessor_test.cc", |
| 1704 | "writer/hlsl/generator_impl_module_constant_test.cc", |
| 1705 | "writer/hlsl/generator_impl_return_test.cc", |
| 1706 | "writer/hlsl/generator_impl_sanitizer_test.cc", |
Ben Clayton | b4744ac | 2022-08-03 07:01:08 +0000 | [diff] [blame] | 1707 | "writer/hlsl/generator_impl_static_assert_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1708 | "writer/hlsl/generator_impl_switch_test.cc", |
| 1709 | "writer/hlsl/generator_impl_test.cc", |
| 1710 | "writer/hlsl/generator_impl_type_test.cc", |
| 1711 | "writer/hlsl/generator_impl_unary_op_test.cc", |
| 1712 | "writer/hlsl/generator_impl_variable_decl_statement_test.cc", |
| 1713 | "writer/hlsl/generator_impl_workgroup_var_test.cc", |
| 1714 | "writer/hlsl/test_helper.h", |
| 1715 | ] |
| 1716 | |
| 1717 | deps = [ |
| 1718 | ":libtint_hlsl_writer_src", |
| 1719 | ":tint_unittests_ast_src", |
| 1720 | ] |
| 1721 | } |
| 1722 | |
| 1723 | tint_unittests_source_set("tint_unittests_glsl_writer_src") { |
| 1724 | sources = [ |
| 1725 | "writer/glsl/generator_impl_array_accessor_test.cc", |
| 1726 | "writer/glsl/generator_impl_assign_test.cc", |
| 1727 | "writer/glsl/generator_impl_binary_test.cc", |
| 1728 | "writer/glsl/generator_impl_bitcast_test.cc", |
| 1729 | "writer/glsl/generator_impl_block_test.cc", |
| 1730 | "writer/glsl/generator_impl_break_test.cc", |
| 1731 | "writer/glsl/generator_impl_builtin_test.cc", |
| 1732 | "writer/glsl/generator_impl_builtin_texture_test.cc", |
| 1733 | "writer/glsl/generator_impl_call_test.cc", |
| 1734 | "writer/glsl/generator_impl_case_test.cc", |
| 1735 | "writer/glsl/generator_impl_cast_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1736 | "writer/glsl/generator_impl_continue_test.cc", |
| 1737 | "writer/glsl/generator_impl_discard_test.cc", |
| 1738 | "writer/glsl/generator_impl_function_test.cc", |
| 1739 | "writer/glsl/generator_impl_identifier_test.cc", |
| 1740 | "writer/glsl/generator_impl_if_test.cc", |
| 1741 | "writer/glsl/generator_impl_import_test.cc", |
dan sinclair | 6e77b47 | 2022-10-20 13:38:28 +0000 | [diff] [blame] | 1742 | "writer/glsl/generator_impl_initializer_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1743 | "writer/glsl/generator_impl_loop_test.cc", |
| 1744 | "writer/glsl/generator_impl_member_accessor_test.cc", |
| 1745 | "writer/glsl/generator_impl_module_constant_test.cc", |
| 1746 | "writer/glsl/generator_impl_return_test.cc", |
| 1747 | "writer/glsl/generator_impl_sanitizer_test.cc", |
| 1748 | "writer/glsl/generator_impl_storage_buffer_test.cc", |
| 1749 | "writer/glsl/generator_impl_switch_test.cc", |
| 1750 | "writer/glsl/generator_impl_test.cc", |
| 1751 | "writer/glsl/generator_impl_type_test.cc", |
| 1752 | "writer/glsl/generator_impl_unary_op_test.cc", |
| 1753 | "writer/glsl/generator_impl_uniform_buffer_test.cc", |
| 1754 | "writer/glsl/generator_impl_variable_decl_statement_test.cc", |
| 1755 | "writer/glsl/generator_impl_workgroup_var_test.cc", |
| 1756 | "writer/glsl/test_helper.h", |
| 1757 | ] |
| 1758 | |
| 1759 | deps = [ |
| 1760 | ":libtint_glsl_writer_src", |
| 1761 | ":tint_unittests_ast_src", |
| 1762 | ":tint_unittests_transform_src", |
| 1763 | ] |
| 1764 | } |
| 1765 | |
| 1766 | tint_unittests_source_set("tint_unittests_core_src") { |
| 1767 | sources = [ |
| 1768 | "castable_test.cc", |
| 1769 | "clone_context_test.cc", |
| 1770 | "debug_test.cc", |
| 1771 | "demangler_test.cc", |
| 1772 | "number_test.cc", |
| 1773 | "program_builder_test.cc", |
| 1774 | "program_test.cc", |
Ben Clayton | 648bd7b | 2022-09-02 11:40:19 +0000 | [diff] [blame] | 1775 | "reflection_test.cc", |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1776 | "scope_stack_test.cc", |
| 1777 | "source_test.cc", |
| 1778 | "symbol_table_test.cc", |
| 1779 | "symbol_test.cc", |
| 1780 | "traits_test.cc", |
| 1781 | "utils/block_allocator_test.cc", |
| 1782 | ] |
| 1783 | |
| 1784 | deps = [ ":tint_unittests_ast_src" ] |
| 1785 | } |
| 1786 | |
| 1787 | if (build_with_chromium) { |
| 1788 | tint_unittests_source_set("tint_unittests_fuzzer_src") { |
| 1789 | sources = [ "fuzzers/random_generator_test.cc" ] |
| 1790 | |
| 1791 | deps = [ |
| 1792 | ":tint_unittests_core_src", |
| 1793 | "fuzzers:tint_fuzzer_common_src", |
| 1794 | ] |
| 1795 | } |
| 1796 | } |
| 1797 | |
| 1798 | source_set("tint_unittests_src") { |
| 1799 | testonly = true |
| 1800 | |
| 1801 | deps = [ |
| 1802 | ":libtint_wgsl_reader_src", |
| 1803 | ":libtint_wgsl_writer_src", |
| 1804 | ":tint_unittests_ast_src", |
| 1805 | ":tint_unittests_core_src", |
| 1806 | ":tint_unittests_diagnostic_src", |
| 1807 | ":tint_unittests_inspector_src", |
| 1808 | ":tint_unittests_resolver_src", |
| 1809 | ":tint_unittests_sem_src", |
| 1810 | ":tint_unittests_text_src", |
| 1811 | ":tint_unittests_transform_src", |
| 1812 | ":tint_unittests_utils_src", |
| 1813 | ":tint_unittests_writer_src", |
| 1814 | ] |
| 1815 | |
| 1816 | if (tint_build_spv_reader) { |
| 1817 | deps += [ ":tint_unittests_spv_reader_src" ] |
| 1818 | } |
| 1819 | |
| 1820 | if (tint_build_spv_writer) { |
| 1821 | deps += [ ":tint_unittests_spv_writer_src" ] |
| 1822 | } |
| 1823 | |
| 1824 | if (tint_build_wgsl_reader) { |
| 1825 | deps += [ ":tint_unittests_wgsl_reader_src" ] |
| 1826 | } |
| 1827 | |
| 1828 | if (tint_build_wgsl_writer) { |
| 1829 | deps += [ ":tint_unittests_wgsl_writer_src" ] |
| 1830 | } |
| 1831 | |
| 1832 | if (tint_build_msl_writer) { |
| 1833 | deps += [ ":tint_unittests_msl_writer_src" ] |
| 1834 | } |
| 1835 | |
| 1836 | if (tint_build_hlsl_writer) { |
| 1837 | deps += [ ":tint_unittests_hlsl_writer_src" ] |
| 1838 | } |
| 1839 | |
| 1840 | if (tint_build_glsl_writer) { |
| 1841 | deps += [ ":tint_unittests_glsl_writer_src" ] |
| 1842 | } |
| 1843 | |
| 1844 | if (build_with_chromium) { |
| 1845 | deps += [ ":tint_unittests_fuzzer_src" ] |
| 1846 | } |
| 1847 | |
dan sinclair | 889a499 | 2022-06-17 13:01:59 +0000 | [diff] [blame] | 1848 | configs += [ ":tint_unittests_config" ] |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 1849 | |
| 1850 | if (build_with_chromium) { |
| 1851 | configs -= [ "//build/config/compiler:chromium_code" ] |
| 1852 | configs += [ "//build/config/compiler:no_chromium_code" ] |
| 1853 | } |
| 1854 | } |
| 1855 | |
| 1856 | test("tint_unittests") { |
| 1857 | deps = [ |
| 1858 | ":gmock_and_gtest", |
| 1859 | ":tint_unittests_src", |
| 1860 | "${tint_spirv_tools_dir}/:spvtools", |
| 1861 | "${tint_spirv_tools_dir}/:spvtools_opt", |
| 1862 | "${tint_spirv_tools_dir}/:spvtools_val", |
| 1863 | ] |
| 1864 | |
| 1865 | deps += [ ":tint_unittests_main" ] |
| 1866 | |
| 1867 | configs += [ ":tint_unittests_config" ] |
| 1868 | |
dan sinclair | 889a499 | 2022-06-17 13:01:59 +0000 | [diff] [blame] | 1869 | if (build_with_chromium) { |
| 1870 | configs -= [ "//build/config/compiler:chromium_code" ] |
| 1871 | configs += [ "//build/config/compiler:no_chromium_code" ] |
| 1872 | } |
| 1873 | |
| 1874 | testonly = true |
dan sinclair | 889a499 | 2022-06-17 13:01:59 +0000 | [diff] [blame] | 1875 | } |
| 1876 | } |