blob: cd6221124ecb75077a18acc469c45a1f2f382211 [file] [log] [blame]
Austin Engcc2516a2023-10-17 20:57:54 +00001# Copyright 2023 The Dawn & Tint Authors
Ben Clayton65625552023-09-11 18:33:43 +00002#
Austin Engcc2516a2023-10-17 20:57:54 +00003# Redistribution and use in source and binary forms, with or without
4# modification, are permitted provided that the following conditions are met:
Ben Clayton65625552023-09-11 18:33:43 +00005#
Austin Engcc2516a2023-10-17 20:57:54 +00006# 1. Redistributions of source code must retain the above copyright notice, this
7# list of conditions and the following disclaimer.
Ben Clayton65625552023-09-11 18:33:43 +00008#
Austin Engcc2516a2023-10-17 20:57:54 +00009# 2. Redistributions in binary form must reproduce the above copyright notice,
10# this list of conditions and the following disclaimer in the documentation
11# and/or other materials provided with the distribution.
12#
13# 3. Neither the name of the copyright holder nor the names of its
14# contributors may be used to endorse or promote products derived from
15# this software without specific prior written permission.
16#
17# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Ben Clayton65625552023-09-11 18:33:43 +000027
28################################################################################
29# File generated by 'tools/src/cmd/gen' using the template:
30# tools/src/cmd/gen/build/BUILD.bazel.tmpl
31#
32# To regenerate run: './tools/run gen'
33#
34# Do not modify this file directly
35################################################################################
36
37load("//src/tint:flags.bzl", "COPTS")
38load("@bazel_skylib//lib:selects.bzl", "selects")
39cc_library(
40 name = "reader",
41 srcs = [
42 "reader.cc",
43 ],
44 hdrs = [
James Price78da6642023-11-06 18:42:21 +000045 "options.h",
Ben Clayton65625552023-09-11 18:33:43 +000046 "reader.h",
47 ],
48 deps = [
49 "//src/tint/api/common",
50 "//src/tint/lang/core",
51 "//src/tint/lang/core/constant",
Ben Claytondfc815c2023-09-25 15:38:43 +000052 "//src/tint/lang/core/ir",
Ben Clayton65625552023-09-11 18:33:43 +000053 "//src/tint/lang/core/type",
Ben Clayton11653892023-09-19 19:15:59 +000054 "//src/tint/lang/wgsl",
Ben Clayton65625552023-09-11 18:33:43 +000055 "//src/tint/lang/wgsl/ast",
James Price78da6642023-11-06 18:42:21 +000056 "//src/tint/lang/wgsl/common",
Ben Clayton3c54ba52023-11-28 21:36:08 +000057 "//src/tint/lang/wgsl/features",
Ben Clayton65625552023-09-11 18:33:43 +000058 "//src/tint/lang/wgsl/program",
Ben Claytondfc815c2023-09-25 15:38:43 +000059 "//src/tint/lang/wgsl/reader/lower",
Ben Clayton65625552023-09-11 18:33:43 +000060 "//src/tint/lang/wgsl/resolver",
61 "//src/tint/lang/wgsl/sem",
62 "//src/tint/utils/containers",
63 "//src/tint/utils/diagnostic",
64 "//src/tint/utils/ice",
65 "//src/tint/utils/id",
66 "//src/tint/utils/macros",
67 "//src/tint/utils/math",
68 "//src/tint/utils/memory",
69 "//src/tint/utils/reflection",
70 "//src/tint/utils/result",
71 "//src/tint/utils/rtti",
72 "//src/tint/utils/symbol",
73 "//src/tint/utils/text",
74 "//src/tint/utils/traits",
Ben Clayton80b987e2023-10-11 14:28:15 +000075 ] + select({
76 ":tint_build_wgsl_reader": [
77 "//src/tint/lang/wgsl/reader/parser",
78 "//src/tint/lang/wgsl/reader/program_to_ir",
79 ],
80 "//conditions:default": [],
81 }),
Ben Clayton65625552023-09-11 18:33:43 +000082 copts = COPTS,
83 visibility = ["//visibility:public"],
84)
85cc_library(
Ben Claytonf1dc9e32024-02-08 17:47:19 +000086 name = "test",
87 alwayslink = True,
88 srcs = [
89 "options_test.cc",
90 ],
91 deps = [
92 "//src/tint/lang/wgsl",
93 "//src/tint/lang/wgsl/common",
94 "//src/tint/lang/wgsl/features",
95 "//src/tint/utils/containers",
96 "//src/tint/utils/diagnostic",
97 "//src/tint/utils/ice",
98 "//src/tint/utils/macros",
99 "//src/tint/utils/math",
100 "//src/tint/utils/memory",
101 "//src/tint/utils/reflection",
102 "//src/tint/utils/result",
103 "//src/tint/utils/rtti",
104 "//src/tint/utils/text",
105 "//src/tint/utils/traits",
106 "@gtest",
107 ] + select({
108 ":tint_build_wgsl_reader": [
109 "//src/tint/lang/wgsl/reader",
110 ],
111 "//conditions:default": [],
112 }),
113 copts = COPTS,
114 visibility = ["//visibility:public"],
115)
116cc_library(
Ben Clayton65625552023-09-11 18:33:43 +0000117 name = "bench",
Ben Clayton9d1b6102023-09-29 12:12:48 +0000118 alwayslink = True,
Ben Clayton65625552023-09-11 18:33:43 +0000119 srcs = [
120 "reader_bench.cc",
121 ],
122 deps = [
Ben Claytondfc815c2023-09-25 15:38:43 +0000123 "//src/tint/api/common",
Ben Clayton9d1b6102023-09-29 12:12:48 +0000124 "//src/tint/cmd/bench:bench",
Ben Clayton65625552023-09-11 18:33:43 +0000125 "//src/tint/lang/core",
126 "//src/tint/lang/core/constant",
Ben Claytondfc815c2023-09-25 15:38:43 +0000127 "//src/tint/lang/core/ir",
Ben Clayton65625552023-09-11 18:33:43 +0000128 "//src/tint/lang/core/type",
Ben Clayton11653892023-09-19 19:15:59 +0000129 "//src/tint/lang/wgsl",
Ben Clayton65625552023-09-11 18:33:43 +0000130 "//src/tint/lang/wgsl/ast",
James Price78da6642023-11-06 18:42:21 +0000131 "//src/tint/lang/wgsl/common",
Ben Clayton3c54ba52023-11-28 21:36:08 +0000132 "//src/tint/lang/wgsl/features",
Ben Clayton65625552023-09-11 18:33:43 +0000133 "//src/tint/lang/wgsl/program",
Ben Clayton65625552023-09-11 18:33:43 +0000134 "//src/tint/lang/wgsl/sem",
135 "//src/tint/utils/containers",
136 "//src/tint/utils/diagnostic",
137 "//src/tint/utils/ice",
138 "//src/tint/utils/id",
139 "//src/tint/utils/macros",
140 "//src/tint/utils/math",
141 "//src/tint/utils/memory",
Ben Claytondfc815c2023-09-25 15:38:43 +0000142 "//src/tint/utils/reflection",
Ben Clayton65625552023-09-11 18:33:43 +0000143 "//src/tint/utils/result",
144 "//src/tint/utils/rtti",
145 "//src/tint/utils/symbol",
146 "//src/tint/utils/text",
147 "//src/tint/utils/traits",
Ben Clayton9d1b6102023-09-29 12:12:48 +0000148 "@benchmark",
Ben Clayton80b987e2023-10-11 14:28:15 +0000149 ] + select({
150 ":tint_build_wgsl_reader": [
151 "//src/tint/lang/wgsl/reader",
152 ],
153 "//conditions:default": [],
154 }),
Ben Clayton65625552023-09-11 18:33:43 +0000155 copts = COPTS,
156 visibility = ["//visibility:public"],
157)
158
Ben Clayton80b987e2023-10-11 14:28:15 +0000159alias(
160 name = "tint_build_wgsl_reader",
161 actual = "//src/tint:tint_build_wgsl_reader_true",
162)
163