# Copyright 2023 The Dawn & Tint Authors
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
#    list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
#    this list of conditions and the following disclaimer in the documentation
#    and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its
#    contributors may be used to endorse or promote products derived from
#    this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

################################################################################
# File generated by 'tools/src/cmd/gen' using the template:
#   tools/src/cmd/gen/build/BUILD.bazel.tmpl
#
# To regenerate run: './tools/run gen'
#
#                       Do not modify this file directly
################################################################################

load("//src/tint:flags.bzl", "COPTS")
load("@bazel_skylib//lib:selects.bzl", "selects")
cc_library(
  name = "writer",
  srcs = [
    "output.cc",
    "writer.cc",
  ],
  hdrs = [
    "output.h",
    "writer.h",
  ],
  deps = [
    "//src/tint/api/common",
    "//src/tint/api/options",
    "//src/tint/lang/core",
    "//src/tint/lang/core/constant",
    "//src/tint/lang/core/ir",
    "//src/tint/lang/core/type",
    "//src/tint/lang/wgsl",
    "//src/tint/lang/wgsl/ast",
    "//src/tint/lang/wgsl/program",
    "//src/tint/lang/wgsl/sem",
    "//src/tint/utils/containers",
    "//src/tint/utils/diagnostic",
    "//src/tint/utils/ice",
    "//src/tint/utils/id",
    "//src/tint/utils/macros",
    "//src/tint/utils/math",
    "//src/tint/utils/memory",
    "//src/tint/utils/reflection",
    "//src/tint/utils/result",
    "//src/tint/utils/rtti",
    "//src/tint/utils/symbol",
    "//src/tint/utils/text",
    "//src/tint/utils/traits",
  ] + select({
    ":tint_build_spv_reader_or_tint_build_spv_writer": [
      "@spirv_headers//:spirv_cpp11_headers", "@spirv_headers//:spirv_c_headers",
    ],
    "//conditions:default": [],
  }) + select({
    ":tint_build_spv_writer": [
      "//src/tint/lang/spirv/writer/ast_printer",
      "//src/tint/lang/spirv/writer/common",
      "//src/tint/lang/spirv/writer/printer",
      "//src/tint/lang/spirv/writer/raise",
    ],
    "//conditions:default": [],
  }),
  copts = COPTS,
  visibility = ["//visibility:public"],
)
cc_library(
  name = "test",
  alwayslink = True,
  srcs = [
    "access_test.cc",
    "atomic_builtin_test.cc",
    "binary_test.cc",
    "bitcast_test.cc",
    "builtin_test.cc",
    "constant_test.cc",
    "construct_test.cc",
    "convert_test.cc",
    "discard_test.cc",
    "function_test.cc",
    "if_test.cc",
    "let_test.cc",
    "loop_test.cc",
    "switch_test.cc",
    "swizzle_test.cc",
    "texture_builtin_test.cc",
    "type_test.cc",
    "unary_test.cc",
    "var_test.cc",
    "writer_test.cc",
  ],
  deps = [
    "//src/tint/api/common",
    "//src/tint/lang/core",
    "//src/tint/lang/core/constant",
    "//src/tint/lang/core/intrinsic",
    "//src/tint/lang/core/ir",
    "//src/tint/lang/core/type",
    "//src/tint/utils/containers",
    "//src/tint/utils/diagnostic",
    "//src/tint/utils/ice",
    "//src/tint/utils/id",
    "//src/tint/utils/macros",
    "//src/tint/utils/math",
    "//src/tint/utils/memory",
    "//src/tint/utils/reflection",
    "//src/tint/utils/result",
    "//src/tint/utils/rtti",
    "//src/tint/utils/symbol",
    "//src/tint/utils/text",
    "//src/tint/utils/traits",
    "@gtest",
  ] + select({
    ":tint_build_spv_reader_or_tint_build_spv_writer": [
      "@spirv_headers//:spirv_cpp11_headers", "@spirv_headers//:spirv_c_headers",
      "@spirv_tools",
    ],
    "//conditions:default": [],
  }) + select({
    ":tint_build_spv_writer": [
      "//src/tint/lang/spirv/writer/common",
      "//src/tint/lang/spirv/writer/common:test",
      "//src/tint/lang/spirv/writer/printer",
      "//src/tint/lang/spirv/writer/raise",
    ],
    "//conditions:default": [],
  }),
  copts = COPTS,
  visibility = ["//visibility:public"],
)
cc_library(
  name = "bench",
  alwayslink = True,
  srcs = [
    "writer_bench.cc",
  ],
  deps = [
    "//src/tint/api/common",
    "//src/tint/cmd/bench:bench",
    "//src/tint/lang/core",
    "//src/tint/lang/core/constant",
    "//src/tint/lang/core/ir",
    "//src/tint/lang/core/type",
    "//src/tint/lang/wgsl",
    "//src/tint/lang/wgsl/ast",
    "//src/tint/lang/wgsl/common",
    "//src/tint/lang/wgsl/program",
    "//src/tint/lang/wgsl/sem",
    "//src/tint/utils/containers",
    "//src/tint/utils/diagnostic",
    "//src/tint/utils/ice",
    "//src/tint/utils/id",
    "//src/tint/utils/macros",
    "//src/tint/utils/math",
    "//src/tint/utils/memory",
    "//src/tint/utils/reflection",
    "//src/tint/utils/result",
    "//src/tint/utils/rtti",
    "//src/tint/utils/symbol",
    "//src/tint/utils/text",
    "//src/tint/utils/traits",
    "@benchmark",
  ] + select({
    ":tint_build_spv_writer": [
      "//src/tint/lang/spirv/writer",
      "//src/tint/lang/spirv/writer/common",
    ],
    "//conditions:default": [],
  }) + select({
    ":tint_build_wgsl_reader": [
      "//src/tint/lang/wgsl/reader",
    ],
    "//conditions:default": [],
  }),
  copts = COPTS,
  visibility = ["//visibility:public"],
)

alias(
  name = "tint_build_spv_reader",
  actual = "//src/tint:tint_build_spv_reader_true",
)

alias(
  name = "tint_build_spv_writer",
  actual = "//src/tint:tint_build_spv_writer_true",
)

alias(
  name = "tint_build_wgsl_reader",
  actual = "//src/tint:tint_build_wgsl_reader_true",
)

selects.config_setting_group(
    name = "tint_build_spv_reader_or_tint_build_spv_writer",
    match_any = [
        "tint_build_spv_reader",
        "tint_build_spv_writer",
    ],
)

