# 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 = "transform",
  srcs = [
    "add_empty_entry_point.cc",
    "array_length_from_uniform.cc",
    "binding_remapper.cc",
    "builtin_polyfill.cc",
    "canonicalize_entry_point_io.cc",
    "data.cc",
    "demote_to_helper.cc",
    "direct_variable_access.cc",
    "disable_uniformity_analysis.cc",
    "expand_compound_assignment.cc",
    "first_index_offset.cc",
    "fold_constants.cc",
    "get_insertion_point.cc",
    "hoist_to_decl_before.cc",
    "manager.cc",
    "multiplanar_external_texture.cc",
    "preserve_padding.cc",
    "promote_initializers_to_let.cc",
    "promote_side_effects_to_decl.cc",
    "remove_continue_in_switch.cc",
    "remove_phonies.cc",
    "remove_unreachable_statements.cc",
    "renamer.cc",
    "robustness.cc",
    "simplify_pointers.cc",
    "single_entry_point.cc",
    "substitute_override.cc",
    "transform.cc",
    "unshadow.cc",
    "vectorize_scalar_matrix_initializers.cc",
    "vertex_pulling.cc",
    "zero_init_workgroup_memory.cc",
  ],
  hdrs = [
    "add_empty_entry_point.h",
    "array_length_from_uniform.h",
    "binding_remapper.h",
    "builtin_polyfill.h",
    "canonicalize_entry_point_io.h",
    "data.h",
    "demote_to_helper.h",
    "direct_variable_access.h",
    "disable_uniformity_analysis.h",
    "expand_compound_assignment.h",
    "first_index_offset.h",
    "fold_constants.h",
    "get_insertion_point.h",
    "hoist_to_decl_before.h",
    "manager.h",
    "multiplanar_external_texture.h",
    "preserve_padding.h",
    "promote_initializers_to_let.h",
    "promote_side_effects_to_decl.h",
    "remove_continue_in_switch.h",
    "remove_phonies.h",
    "remove_unreachable_statements.h",
    "renamer.h",
    "robustness.h",
    "simplify_pointers.h",
    "single_entry_point.h",
    "substitute_override.h",
    "transform.h",
    "unshadow.h",
    "vectorize_scalar_matrix_initializers.h",
    "vertex_pulling.h",
    "zero_init_workgroup_memory.h",
  ],
  deps = [
    "//src/tint/api/common",
    "//src/tint/lang/core",
    "//src/tint/lang/core/common",
    "//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/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",
  ],
  copts = COPTS,
  visibility = ["//visibility:public"],
)
cc_library(
  name = "test",
  alwayslink = True,
  srcs = [
    "add_empty_entry_point_test.cc",
    "array_length_from_uniform_test.cc",
    "binding_remapper_test.cc",
    "builtin_polyfill_test.cc",
    "canonicalize_entry_point_io_test.cc",
    "demote_to_helper_test.cc",
    "direct_variable_access_test.cc",
    "disable_uniformity_analysis_test.cc",
    "expand_compound_assignment_test.cc",
    "first_index_offset_test.cc",
    "fold_constants_test.cc",
    "get_insertion_point_test.cc",
    "helper_test.h",
    "hoist_to_decl_before_test.cc",
    "manager_test.cc",
    "multiplanar_external_texture_test.cc",
    "preserve_padding_test.cc",
    "promote_initializers_to_let_test.cc",
    "promote_side_effects_to_decl_test.cc",
    "remove_continue_in_switch_test.cc",
    "remove_phonies_test.cc",
    "remove_unreachable_statements_test.cc",
    "renamer_test.cc",
    "robustness_test.cc",
    "simplify_pointers_test.cc",
    "single_entry_point_test.cc",
    "substitute_override_test.cc",
    "transform_test.cc",
    "unshadow_test.cc",
    "vectorize_scalar_matrix_initializers_test.cc",
    "vertex_pulling_test.cc",
    "zero_init_workgroup_memory_test.cc",
  ],
  deps = [
    "//src/tint/api/common",
    "//src/tint/lang/core",
    "//src/tint/lang/core/common",
    "//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/ast/transform",
    "//src/tint/lang/wgsl/ast:test",
    "//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/lang/wgsl/writer/ir_to_program",
    "//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",
    "//src/utils",
  ] + select({
    ":tint_build_wgsl_reader": [
      "//src/tint/lang/wgsl/reader",
    ],
    "//conditions:default": [],
  }) + select({
    ":tint_build_wgsl_writer": [
      "//src/tint/lang/wgsl/writer",
    ],
    "//conditions:default": [],
  }),
  copts = COPTS,
  visibility = ["//visibility:public"],
)

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

alias(
  name = "tint_build_wgsl_writer",
  actual = "//src/tint:tint_build_wgsl_writer_true",
)

selects.config_setting_group(
    name = "tint_build_wgsl_reader_and_tint_build_wgsl_writer",
    match_all = [
        ":tint_build_wgsl_reader",
        ":tint_build_wgsl_writer",
    ],
)

