# 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 = "ast_parser",
  srcs = [
    "ast_parser.cc",
    "construct.cc",
    "entry_point_info.cc",
    "enum_converter.cc",
    "function.cc",
    "namer.cc",
    "parse.cc",
    "type.cc",
    "usage.cc",
  ],
  hdrs = [
    "ast_parser.h",
    "attributes.h",
    "construct.h",
    "entry_point_info.h",
    "enum_converter.h",
    "fail_stream.h",
    "function.h",
    "namer.h",
    "parse.h",
    "type.h",
    "usage.h",
  ],
  deps = [
    "//src/tint/api/common",
    "//src/tint/lang/core",
    "//src/tint/lang/core/constant",
    "//src/tint/lang/core/type",
    "//src/tint/lang/wgsl",
    "//src/tint/lang/wgsl/ast",
    "//src/tint/lang/wgsl/ast/transform",
    "//src/tint/lang/wgsl/common",
    "//src/tint/lang/wgsl/features",
    "//src/tint/lang/wgsl/program",
    "//src/tint/lang/wgsl/resolver",
    "//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",
    "//src/utils",
  ] + select({
    ":tint_build_spv_reader": [
      "//src/tint/lang/spirv/reader/ast_lower",
      "//src/tint/lang/spirv/reader/common",
    ],
    "//conditions:default": [],
  }) + select({
    ":tint_build_spv_reader_or_tint_build_spv_writer": [
      "@spirv_headers//:spirv_cpp11_headers", "@spirv_headers//:spirv_c_headers",
      "@spirv_tools//:spirv_tools_opt",
    ],
    "//conditions:default": [],
  }),
  copts = COPTS,
  visibility = ["//visibility:public"],
)
cc_library(
  name = "test",
  alwayslink = True,
  srcs = [
    "ast_parser_test.cc",
    "barrier_test.cc",
    "constant_test.cc",
    "convert_member_decoration_test.cc",
    "convert_type_test.cc",
    "enum_converter_test.cc",
    "fail_stream_test.cc",
    "function_arithmetic_test.cc",
    "function_bit_test.cc",
    "function_call_test.cc",
    "function_cfg_test.cc",
    "function_composite_test.cc",
    "function_conversion_test.cc",
    "function_decl_test.cc",
    "function_glsl_std_450_test.cc",
    "function_logical_test.cc",
    "function_memory_test.cc",
    "function_misc_test.cc",
    "function_var_test.cc",
    "get_decorations_test.cc",
    "handle_test.cc",
    "helper_test.cc",
    "helper_test.h",
    "import_test.cc",
    "module_function_decl_test.cc",
    "module_var_test.cc",
    "named_types_test.cc",
    "namer_test.cc",
    "parser_test.cc",
    "row_major_matrix_test.cc",
    "spirv_tools_helpers_test.cc",
    "spirv_tools_helpers_test.h",
    "type_test.cc",
    "usage_test.cc",
    "user_name_test.cc",
  ],
  deps = [
    "//src/tint/api/common",
    "//src/tint/lang/core",
    "//src/tint/lang/core/constant",
    "//src/tint/lang/core/type",
    "//src/tint/lang/wgsl",
    "//src/tint/lang/wgsl/ast",
    "//src/tint/lang/wgsl/common",
    "//src/tint/lang/wgsl/features",
    "//src/tint/lang/wgsl/program",
    "//src/tint/lang/wgsl/sem",
    "//src/tint/lang/wgsl/writer/ir_to_program",
    "//src/tint/utils/containers",
    "//src/tint/utils/diagnostic",
    "//src/tint/utils/generator",
    "//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",
    "//src/utils",
  ] + select({
    ":tint_build_spv_reader": [
      "//src/tint/lang/spirv/reader/ast_parser",
      "//src/tint/lang/spirv/reader/common",
    ],
    "//conditions:default": [],
  }) + select({
    ":tint_build_spv_reader_or_tint_build_spv_writer": [
      "@spirv_headers//:spirv_cpp11_headers", "@spirv_headers//:spirv_c_headers",
      "@spirv_tools//:spirv_tools_opt",
      "@spirv_tools",
    ],
    "//conditions:default": [],
  }) + select({
    ":tint_build_wgsl_writer": [
      "//src/tint/lang/wgsl/writer",
      "//src/tint/lang/wgsl/writer/ast_printer",
    ],
    "//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_writer",
  actual = "//src/tint:tint_build_wgsl_writer_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",
    ],
)

selects.config_setting_group(
    name = "tint_build_spv_reader_and_tint_build_wgsl_writer",
    match_all = [
        ":tint_build_spv_reader",
        ":tint_build_wgsl_writer",
    ],
)

