# Copyright 2024 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.gn.tmpl
#
# To regenerate run: './tools/run gen'
#
#                       Do not modify this file directly
################################################################################

import("../../../../../../scripts/dawn_overrides_with_defaults.gni")
import("../../../../../../scripts/tint_overrides_with_defaults.gni")

import("${tint_src_dir}/tint.gni")

if (tint_build_unittests || tint_build_benchmarks) {
  import("//testing/test.gni")
}

libtint_source_set("raise") {
  sources = [
    "binary_polyfill.cc",
    "binary_polyfill.h",
    "builtin_polyfill.cc",
    "builtin_polyfill.h",
    "decompose_storage_access.cc",
    "decompose_storage_access.h",
    "decompose_uniform_access.cc",
    "decompose_uniform_access.h",
    "fxc_polyfill.cc",
    "fxc_polyfill.h",
    "localize_struct_array_assignment.cc",
    "localize_struct_array_assignment.h",
    "promote_initializers.cc",
    "promote_initializers.h",
    "raise.cc",
    "raise.h",
    "shader_io.cc",
    "shader_io.h",
  ]
  deps = [
    "${dawn_root}/src/utils:utils",
    "${tint_src_dir}/api/common",
    "${tint_src_dir}/lang/core",
    "${tint_src_dir}/lang/core/common",
    "${tint_src_dir}/lang/core/constant",
    "${tint_src_dir}/lang/core/intrinsic",
    "${tint_src_dir}/lang/core/ir",
    "${tint_src_dir}/lang/core/ir/transform",
    "${tint_src_dir}/lang/core/type",
    "${tint_src_dir}/lang/hlsl",
    "${tint_src_dir}/lang/hlsl/intrinsic",
    "${tint_src_dir}/lang/hlsl/ir",
    "${tint_src_dir}/lang/hlsl/type",
    "${tint_src_dir}/lang/hlsl/writer/common",
    "${tint_src_dir}/utils/containers",
    "${tint_src_dir}/utils/diagnostic",
    "${tint_src_dir}/utils/ice",
    "${tint_src_dir}/utils/id",
    "${tint_src_dir}/utils/macros",
    "${tint_src_dir}/utils/math",
    "${tint_src_dir}/utils/memory",
    "${tint_src_dir}/utils/reflection",
    "${tint_src_dir}/utils/result",
    "${tint_src_dir}/utils/rtti",
    "${tint_src_dir}/utils/symbol",
    "${tint_src_dir}/utils/text",
    "${tint_src_dir}/utils/traits",
  ]
}
if (tint_build_unittests) {
  tint_unittests_source_set("unittests") {
    sources = [
      "binary_polyfill_test.cc",
      "builtin_polyfill_test.cc",
      "decompose_storage_access_test.cc",
      "decompose_uniform_access_test.cc",
      "fxc_polyfill_test.cc",
      "localize_struct_array_assignment_test.cc",
      "promote_initializers_test.cc",
      "shader_io_test.cc",
    ]
    deps = [
      "${dawn_root}/src/utils:utils",
      "${tint_src_dir}:gmock_and_gtest",
      "${tint_src_dir}/api/common",
      "${tint_src_dir}/lang/core",
      "${tint_src_dir}/lang/core/constant",
      "${tint_src_dir}/lang/core/intrinsic",
      "${tint_src_dir}/lang/core/ir",
      "${tint_src_dir}/lang/core/ir/transform:unittests",
      "${tint_src_dir}/lang/core/type",
      "${tint_src_dir}/lang/hlsl/writer/raise",
      "${tint_src_dir}/utils/containers",
      "${tint_src_dir}/utils/diagnostic",
      "${tint_src_dir}/utils/ice",
      "${tint_src_dir}/utils/id",
      "${tint_src_dir}/utils/macros",
      "${tint_src_dir}/utils/math",
      "${tint_src_dir}/utils/memory",
      "${tint_src_dir}/utils/reflection",
      "${tint_src_dir}/utils/result",
      "${tint_src_dir}/utils/rtti",
      "${tint_src_dir}/utils/symbol",
      "${tint_src_dir}/utils/text",
      "${tint_src_dir}/utils/traits",
    ]
  }
}

tint_fuzz_source_set("fuzz") {
  sources = [ "promote_initializers_fuzz.cc" ]
  deps = [
    "${dawn_root}/src/utils:utils",
    "${tint_src_dir}/api/common",
    "${tint_src_dir}/cmd/fuzz/ir:fuzz",
    "${tint_src_dir}/lang/core",
    "${tint_src_dir}/lang/core/constant",
    "${tint_src_dir}/lang/core/ir",
    "${tint_src_dir}/lang/core/type",
    "${tint_src_dir}/lang/hlsl/writer/raise",
    "${tint_src_dir}/utils/bytes",
    "${tint_src_dir}/utils/containers",
    "${tint_src_dir}/utils/diagnostic",
    "${tint_src_dir}/utils/ice",
    "${tint_src_dir}/utils/id",
    "${tint_src_dir}/utils/macros",
    "${tint_src_dir}/utils/math",
    "${tint_src_dir}/utils/memory",
    "${tint_src_dir}/utils/reflection",
    "${tint_src_dir}/utils/result",
    "${tint_src_dir}/utils/rtti",
    "${tint_src_dir}/utils/symbol",
    "${tint_src_dir}/utils/text",
    "${tint_src_dir}/utils/traits",
  ]
}
