Austin Eng | cc2516a | 2023-10-17 20:57:54 +0000 | [diff] [blame] | 1 | # Copyright 2023 The Dawn & Tint Authors |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 2 | # |
Austin Eng | cc2516a | 2023-10-17 20:57:54 +0000 | [diff] [blame] | 3 | # Redistribution and use in source and binary forms, with or without |
| 4 | # modification, are permitted provided that the following conditions are met: |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 5 | # |
Austin Eng | cc2516a | 2023-10-17 20:57:54 +0000 | [diff] [blame] | 6 | # 1. Redistributions of source code must retain the above copyright notice, this |
| 7 | # list of conditions and the following disclaimer. |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 8 | # |
Austin Eng | cc2516a | 2023-10-17 20:57:54 +0000 | [diff] [blame] | 9 | # 2. Redistributions in binary form must reproduce the above copyright notice, |
| 10 | # this list of conditions and the following disclaimer in the documentation |
| 11 | # and/or other materials provided with the distribution. |
| 12 | # |
| 13 | # 3. Neither the name of the copyright holder nor the names of its |
| 14 | # contributors may be used to endorse or promote products derived from |
| 15 | # this software without specific prior written permission. |
| 16 | # |
| 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 18 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 19 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 20 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
| 21 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 22 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| 23 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| 24 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| 25 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 27 | |
| 28 | ################################################################################ |
| 29 | # File generated by 'tools/src/cmd/gen' using the template: |
| 30 | # tools/src/cmd/gen/build/BUILD.bazel.tmpl |
| 31 | # |
| 32 | # To regenerate run: './tools/run gen' |
| 33 | # |
| 34 | # Do not modify this file directly |
| 35 | ################################################################################ |
| 36 | |
| 37 | load("//src/tint:flags.bzl", "COPTS") |
| 38 | load("@bazel_skylib//lib:selects.bzl", "selects") |
| 39 | cc_library( |
| 40 | name = "common", |
| 41 | srcs = [ |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 42 | "helper.cc", |
| 43 | ], |
| 44 | hdrs = [ |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 45 | "helper.h", |
| 46 | ], |
| 47 | deps = [ |
| 48 | "//src/tint/api/common", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 49 | "//src/tint/lang/core", |
| 50 | "//src/tint/lang/core/constant", |
Ben Clayton | dfc815c | 2023-09-25 15:38:43 +0000 | [diff] [blame] | 51 | "//src/tint/lang/core/ir", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 52 | "//src/tint/lang/core/type", |
Ben Clayton | 1165389 | 2023-09-19 19:15:59 +0000 | [diff] [blame] | 53 | "//src/tint/lang/wgsl", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 54 | "//src/tint/lang/wgsl/ast", |
James Price | 78da664 | 2023-11-06 18:42:21 +0000 | [diff] [blame] | 55 | "//src/tint/lang/wgsl/common", |
Ben Clayton | 3c54ba5 | 2023-11-28 21:36:08 +0000 | [diff] [blame] | 56 | "//src/tint/lang/wgsl/features", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 57 | "//src/tint/lang/wgsl/inspector", |
| 58 | "//src/tint/lang/wgsl/program", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 59 | "//src/tint/lang/wgsl/sem", |
James Price | fb728a3 | 2023-12-12 01:07:35 +0000 | [diff] [blame] | 60 | "//src/tint/lang/wgsl/writer/ir_to_program", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 61 | "//src/tint/utils/containers", |
| 62 | "//src/tint/utils/diagnostic", |
| 63 | "//src/tint/utils/ice", |
| 64 | "//src/tint/utils/id", |
| 65 | "//src/tint/utils/macros", |
| 66 | "//src/tint/utils/math", |
| 67 | "//src/tint/utils/memory", |
| 68 | "//src/tint/utils/reflection", |
| 69 | "//src/tint/utils/result", |
| 70 | "//src/tint/utils/rtti", |
| 71 | "//src/tint/utils/symbol", |
| 72 | "//src/tint/utils/text", |
| 73 | "//src/tint/utils/traits", |
| 74 | ] + select({ |
| 75 | ":tint_build_spv_reader": [ |
| 76 | "//src/tint/lang/spirv/reader", |
James Price | 526e4b8 | 2024-01-17 17:01:30 +0000 | [diff] [blame] | 77 | "//src/tint/lang/spirv/reader/common", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 78 | ], |
| 79 | "//conditions:default": [], |
| 80 | }) + select({ |
| 81 | ":tint_build_spv_reader_or_tint_build_spv_writer": [ |
| 82 | "@spirv_tools", |
| 83 | ], |
| 84 | "//conditions:default": [], |
Ben Clayton | 2550b49 | 2023-10-11 10:41:12 +0000 | [diff] [blame] | 85 | }) + select({ |
Ben Clayton | 80b987e | 2023-10-11 14:28:15 +0000 | [diff] [blame] | 86 | ":tint_build_wgsl_reader": [ |
| 87 | "//src/tint/lang/wgsl/reader", |
| 88 | ], |
| 89 | "//conditions:default": [], |
| 90 | }) + select({ |
Ben Clayton | 2550b49 | 2023-10-11 10:41:12 +0000 | [diff] [blame] | 91 | ":tint_build_wgsl_writer": [ |
| 92 | "//src/tint/lang/wgsl/writer", |
| 93 | ], |
| 94 | "//conditions:default": [], |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 95 | }), |
| 96 | copts = COPTS, |
| 97 | visibility = ["//visibility:public"], |
| 98 | ) |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 99 | |
| 100 | alias( |
| 101 | name = "tint_build_spv_reader", |
| 102 | actual = "//src/tint:tint_build_spv_reader_true", |
| 103 | ) |
| 104 | |
| 105 | alias( |
| 106 | name = "tint_build_spv_writer", |
| 107 | actual = "//src/tint:tint_build_spv_writer_true", |
| 108 | ) |
| 109 | |
Ben Clayton | 2550b49 | 2023-10-11 10:41:12 +0000 | [diff] [blame] | 110 | alias( |
Ben Clayton | 80b987e | 2023-10-11 14:28:15 +0000 | [diff] [blame] | 111 | name = "tint_build_wgsl_reader", |
| 112 | actual = "//src/tint:tint_build_wgsl_reader_true", |
| 113 | ) |
| 114 | |
| 115 | alias( |
Ben Clayton | 2550b49 | 2023-10-11 10:41:12 +0000 | [diff] [blame] | 116 | name = "tint_build_wgsl_writer", |
| 117 | actual = "//src/tint:tint_build_wgsl_writer_true", |
| 118 | ) |
| 119 | |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 120 | selects.config_setting_group( |
| 121 | name = "tint_build_spv_reader_or_tint_build_spv_writer", |
| 122 | match_any = [ |
| 123 | "tint_build_spv_reader", |
| 124 | "tint_build_spv_writer", |
| 125 | ], |
| 126 | ) |
| 127 | |