blob: 96c08799fdd2c5958dbd975444636299d8afe543 [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 = "program",
41 srcs = [
42 "clone_context.cc",
43 "program.cc",
44 "program_builder.cc",
45 ],
46 hdrs = [
47 "clone_context.h",
48 "program.h",
49 "program_builder.h",
50 ],
51 deps = [
52 "//src/tint/api/common",
53 "//src/tint/lang/core",
54 "//src/tint/lang/core/constant",
55 "//src/tint/lang/core/type",
Ben Clayton11653892023-09-19 19:15:59 +000056 "//src/tint/lang/wgsl",
Ben Clayton65625552023-09-11 18:33:43 +000057 "//src/tint/lang/wgsl/ast",
Ben Clayton3c54ba52023-11-28 21:36:08 +000058 "//src/tint/lang/wgsl/features",
Ben Clayton65625552023-09-11 18:33:43 +000059 "//src/tint/lang/wgsl/sem",
60 "//src/tint/utils/containers",
61 "//src/tint/utils/diagnostic",
62 "//src/tint/utils/ice",
63 "//src/tint/utils/id",
64 "//src/tint/utils/macros",
65 "//src/tint/utils/math",
66 "//src/tint/utils/memory",
67 "//src/tint/utils/reflection",
68 "//src/tint/utils/result",
69 "//src/tint/utils/rtti",
70 "//src/tint/utils/symbol",
71 "//src/tint/utils/text",
72 "//src/tint/utils/traits",
73 ],
74 copts = COPTS,
75 visibility = ["//visibility:public"],
76)
77cc_library(
78 name = "test",
79 alwayslink = True,
80 srcs = [
81 "clone_context_test.cc",
82 "program_builder_test.cc",
83 "program_test.cc",
84 ],
85 deps = [
86 "//src/tint/api/common",
87 "//src/tint/lang/core",
88 "//src/tint/lang/core/constant",
89 "//src/tint/lang/core/type",
Ben Clayton11653892023-09-19 19:15:59 +000090 "//src/tint/lang/wgsl",
Ben Clayton65625552023-09-11 18:33:43 +000091 "//src/tint/lang/wgsl/ast",
92 "//src/tint/lang/wgsl/ast:test",
James Price78da6642023-11-06 18:42:21 +000093 "//src/tint/lang/wgsl/common",
Ben Clayton3c54ba52023-11-28 21:36:08 +000094 "//src/tint/lang/wgsl/features",
Ben Clayton65625552023-09-11 18:33:43 +000095 "//src/tint/lang/wgsl/program",
96 "//src/tint/lang/wgsl/resolver",
97 "//src/tint/lang/wgsl/sem",
98 "//src/tint/utils/containers",
99 "//src/tint/utils/diagnostic",
100 "//src/tint/utils/ice",
101 "//src/tint/utils/id",
102 "//src/tint/utils/macros",
103 "//src/tint/utils/math",
104 "//src/tint/utils/memory",
105 "//src/tint/utils/reflection",
106 "//src/tint/utils/result",
107 "//src/tint/utils/rtti",
108 "//src/tint/utils/symbol",
109 "//src/tint/utils/text",
110 "//src/tint/utils/traits",
111 "@gtest",
112 ],
113 copts = COPTS,
114 visibility = ["//visibility:public"],
115)
116
Ben Clayton0619b8c2023-11-03 00:21:53 +0000117alias(
118 name = "tint_build_wgsl_reader",
119 actual = "//src/tint:tint_build_wgsl_reader_true",
120)
121
122alias(
123 name = "tint_build_wgsl_writer",
124 actual = "//src/tint:tint_build_wgsl_writer_true",
125)
126
127selects.config_setting_group(
128 name = "tint_build_wgsl_reader_and_tint_build_wgsl_writer",
129 match_all = [
130 ":tint_build_wgsl_reader",
131 ":tint_build_wgsl_writer",
132 ],
133)
134