blob: a1b43d70f57a953522f235dd834ec03f2a10665d [file] [log] [blame] [edit]
# 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.gn.tmpl
#
# To regenerate run: './tools/run gen'
#
# Do not modify this file directly
################################################################################
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("ast") {
sources = [
"accessor_expression.cc",
"accessor_expression.h",
"alias.cc",
"alias.h",
"assignment_statement.cc",
"assignment_statement.h",
"attribute.cc",
"attribute.h",
"binary_expression.cc",
"binary_expression.h",
"binding_attribute.cc",
"binding_attribute.h",
"blend_src_attribute.cc",
"blend_src_attribute.h",
"block_statement.cc",
"block_statement.h",
"bool_literal_expression.cc",
"bool_literal_expression.h",
"break_if_statement.cc",
"break_if_statement.h",
"break_statement.cc",
"break_statement.h",
"builder.cc",
"builder.h",
"builtin_attribute.cc",
"builtin_attribute.h",
"call_expression.cc",
"call_expression.h",
"call_statement.cc",
"call_statement.h",
"case_selector.cc",
"case_selector.h",
"case_statement.cc",
"case_statement.h",
"clone_context.cc",
"clone_context.h",
"color_attribute.cc",
"color_attribute.h",
"compound_assignment_statement.cc",
"compound_assignment_statement.h",
"const.cc",
"const.h",
"const_assert.cc",
"const_assert.h",
"continue_statement.cc",
"continue_statement.h",
"diagnostic_attribute.cc",
"diagnostic_attribute.h",
"diagnostic_control.cc",
"diagnostic_control.h",
"diagnostic_directive.cc",
"diagnostic_directive.h",
"diagnostic_rule_name.cc",
"diagnostic_rule_name.h",
"disable_validation_attribute.cc",
"disable_validation_attribute.h",
"discard_statement.cc",
"discard_statement.h",
"enable.cc",
"enable.h",
"expression.cc",
"expression.h",
"extension.cc",
"extension.h",
"float_literal_expression.cc",
"float_literal_expression.h",
"for_loop_statement.cc",
"for_loop_statement.h",
"function.cc",
"function.h",
"group_attribute.cc",
"group_attribute.h",
"id_attribute.cc",
"id_attribute.h",
"identifier.cc",
"identifier.h",
"identifier_expression.cc",
"identifier_expression.h",
"if_statement.cc",
"if_statement.h",
"increment_decrement_statement.cc",
"increment_decrement_statement.h",
"index_accessor_expression.cc",
"index_accessor_expression.h",
"input_attachment_index_attribute.cc",
"input_attachment_index_attribute.h",
"int_literal_expression.cc",
"int_literal_expression.h",
"internal_attribute.cc",
"internal_attribute.h",
"interpolate_attribute.cc",
"interpolate_attribute.h",
"invariant_attribute.cc",
"invariant_attribute.h",
"let.cc",
"let.h",
"literal_expression.cc",
"literal_expression.h",
"location_attribute.cc",
"location_attribute.h",
"loop_statement.cc",
"loop_statement.h",
"member_accessor_expression.cc",
"member_accessor_expression.h",
"module.cc",
"module.h",
"must_use_attribute.cc",
"must_use_attribute.h",
"node.cc",
"node.h",
"node_id.h",
"override.cc",
"override.h",
"parameter.cc",
"parameter.h",
"phony_expression.cc",
"phony_expression.h",
"pipeline_stage.cc",
"pipeline_stage.h",
"requires.cc",
"requires.h",
"return_statement.cc",
"return_statement.h",
"stage_attribute.cc",
"stage_attribute.h",
"statement.cc",
"statement.h",
"stride_attribute.cc",
"stride_attribute.h",
"struct.cc",
"struct.h",
"struct_member.cc",
"struct_member.h",
"struct_member_align_attribute.cc",
"struct_member_align_attribute.h",
"struct_member_offset_attribute.cc",
"struct_member_offset_attribute.h",
"struct_member_size_attribute.cc",
"struct_member_size_attribute.h",
"switch_statement.cc",
"switch_statement.h",
"templated_identifier.cc",
"templated_identifier.h",
"traverse_expressions.h",
"type.cc",
"type.h",
"type_decl.cc",
"type_decl.h",
"unary_op_expression.cc",
"unary_op_expression.h",
"var.cc",
"var.h",
"variable.cc",
"variable.h",
"variable_decl_statement.cc",
"variable_decl_statement.h",
"while_statement.cc",
"while_statement.h",
"workgroup_attribute.cc",
"workgroup_attribute.h",
]
deps = [
"${tint_src_dir}/api/common",
"${tint_src_dir}/lang/core",
"${tint_src_dir}/lang/core/type",
"${tint_src_dir}/lang/wgsl",
"${tint_src_dir}/lang/wgsl/features",
"${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 = [
"alias_test.cc",
"assignment_statement_test.cc",
"binary_expression_test.cc",
"binding_attribute_test.cc",
"blend_src_attribute_test.cc",
"block_statement_test.cc",
"bool_literal_expression_test.cc",
"break_if_statement_test.cc",
"break_statement_test.cc",
"builtin_attribute_test.cc",
"builtin_texture_helper_test.cc",
"builtin_texture_helper_test.h",
"call_expression_test.cc",
"call_statement_test.cc",
"case_selector_test.cc",
"case_statement_test.cc",
"clone_context_test.cc",
"color_attribute_test.cc",
"compound_assignment_statement_test.cc",
"const_assert_test.cc",
"continue_statement_test.cc",
"diagnostic_attribute_test.cc",
"diagnostic_control_test.cc",
"diagnostic_directive_test.cc",
"diagnostic_rule_name_test.cc",
"discard_statement_test.cc",
"enable_test.cc",
"float_literal_expression_test.cc",
"for_loop_statement_test.cc",
"function_test.cc",
"group_attribute_test.cc",
"helper_test.cc",
"helper_test.h",
"id_attribute_test.cc",
"identifier_expression_test.cc",
"identifier_test.cc",
"if_statement_test.cc",
"increment_decrement_statement_test.cc",
"index_accessor_expression_test.cc",
"input_attachment_index_attribute_test.cc",
"int_literal_expression_test.cc",
"interpolate_attribute_test.cc",
"location_attribute_test.cc",
"loop_statement_test.cc",
"member_accessor_expression_test.cc",
"module_test.cc",
"phony_expression_test.cc",
"requires_test.cc",
"return_statement_test.cc",
"stage_attribute_test.cc",
"stride_attribute_test.cc",
"struct_member_align_attribute_test.cc",
"struct_member_offset_attribute_test.cc",
"struct_member_size_attribute_test.cc",
"struct_member_test.cc",
"struct_test.cc",
"switch_statement_test.cc",
"templated_identifier_test.cc",
"traverse_expressions_test.cc",
"unary_op_expression_test.cc",
"variable_decl_statement_test.cc",
"variable_test.cc",
"while_statement_test.cc",
"workgroup_attribute_test.cc",
]
deps = [
"${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/ir",
"${tint_src_dir}/lang/core/type",
"${tint_src_dir}/lang/wgsl",
"${tint_src_dir}/lang/wgsl/ast",
"${tint_src_dir}/lang/wgsl/ast/transform",
"${tint_src_dir}/lang/wgsl/common",
"${tint_src_dir}/lang/wgsl/features",
"${tint_src_dir}/lang/wgsl/program",
"${tint_src_dir}/lang/wgsl/resolver",
"${tint_src_dir}/lang/wgsl/sem",
"${tint_src_dir}/lang/wgsl/writer/ir_to_program",
"${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_wgsl_reader) {
deps += [ "${tint_src_dir}/lang/wgsl/reader" ]
}
if (tint_build_wgsl_reader && tint_build_wgsl_writer) {
sources += [ "module_clone_test.cc" ]
}
if (tint_build_wgsl_writer) {
deps += [ "${tint_src_dir}/lang/wgsl/writer" ]
}
}
}