blob: b596753296693c786bf5fe9e7ebd2eefa57e55a4 [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 = "common",
41 srcs = [
Ben Clayton65625552023-09-11 18:33:43 +000042 "helper.cc",
43 ],
44 hdrs = [
Ben Clayton65625552023-09-11 18:33:43 +000045 "helper.h",
46 ],
47 deps = [
48 "//src/tint/api/common",
Ben Clayton65625552023-09-11 18:33:43 +000049 "//src/tint/lang/core",
50 "//src/tint/lang/core/constant",
Ben Claytondfc815c2023-09-25 15:38:43 +000051 "//src/tint/lang/core/ir",
Ben Clayton65625552023-09-11 18:33:43 +000052 "//src/tint/lang/core/type",
Ben Clayton11653892023-09-19 19:15:59 +000053 "//src/tint/lang/wgsl",
Ben Clayton65625552023-09-11 18:33:43 +000054 "//src/tint/lang/wgsl/ast",
James Price78da6642023-11-06 18:42:21 +000055 "//src/tint/lang/wgsl/common",
Ben Clayton3c54ba52023-11-28 21:36:08 +000056 "//src/tint/lang/wgsl/features",
Ben Clayton65625552023-09-11 18:33:43 +000057 "//src/tint/lang/wgsl/inspector",
58 "//src/tint/lang/wgsl/program",
Ben Clayton65625552023-09-11 18:33:43 +000059 "//src/tint/lang/wgsl/sem",
James Pricefb728a32023-12-12 01:07:35 +000060 "//src/tint/lang/wgsl/writer/ir_to_program",
Ben Clayton65625552023-09-11 18:33:43 +000061 "//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 Price526e4b82024-01-17 17:01:30 +000077 "//src/tint/lang/spirv/reader/common",
Ben Clayton65625552023-09-11 18:33:43 +000078 ],
79 "//conditions:default": [],
80 }) + select({
81 ":tint_build_spv_reader_or_tint_build_spv_writer": [
82 "@spirv_tools",
83 ],
84 "//conditions:default": [],
Ben Clayton2550b492023-10-11 10:41:12 +000085 }) + select({
Ben Clayton80b987e2023-10-11 14:28:15 +000086 ":tint_build_wgsl_reader": [
87 "//src/tint/lang/wgsl/reader",
88 ],
89 "//conditions:default": [],
90 }) + select({
Ben Clayton2550b492023-10-11 10:41:12 +000091 ":tint_build_wgsl_writer": [
92 "//src/tint/lang/wgsl/writer",
93 ],
94 "//conditions:default": [],
Ben Clayton65625552023-09-11 18:33:43 +000095 }),
96 copts = COPTS,
97 visibility = ["//visibility:public"],
98)
Ben Clayton65625552023-09-11 18:33:43 +000099
100alias(
101 name = "tint_build_spv_reader",
102 actual = "//src/tint:tint_build_spv_reader_true",
103)
104
105alias(
106 name = "tint_build_spv_writer",
107 actual = "//src/tint:tint_build_spv_writer_true",
108)
109
Ben Clayton2550b492023-10-11 10:41:12 +0000110alias(
Ben Clayton80b987e2023-10-11 14:28:15 +0000111 name = "tint_build_wgsl_reader",
112 actual = "//src/tint:tint_build_wgsl_reader_true",
113)
114
115alias(
Ben Clayton2550b492023-10-11 10:41:12 +0000116 name = "tint_build_wgsl_writer",
117 actual = "//src/tint:tint_build_wgsl_writer_true",
118)
119
Ben Clayton65625552023-09-11 18:33:43 +0000120selects.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