[tint][GN]: wrap all IR rules in 'if (tint_build_ir)'

Change-Id: Idc75849e337c9436e8a74a9abdb61f71d9370293
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133700
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
Ben Clayton 2023-05-19 12:00:39 +00:00 committed by Dawn LUCI CQ
parent ced1cf33ce
commit 7b2dbeb634
1 changed files with 126 additions and 117 deletions

View File

@ -384,11 +384,16 @@ libtint_source_set("libtint_transform_manager_src") {
] ]
deps = [ deps = [
":libtint_ast_transform_base_src", ":libtint_ast_transform_base_src",
":libtint_ir_builder_src",
":libtint_ir_src",
":libtint_program_src", ":libtint_program_src",
":libtint_transform_src", ":libtint_transform_src",
] ]
if (tint_build_ir) {
deps += [
":libtint_ir_builder_src",
":libtint_ir_src",
]
}
} }
libtint_source_set("libtint_ast_transform_src") { libtint_source_set("libtint_ast_transform_src") {
@ -1175,97 +1180,99 @@ libtint_source_set("libtint_syntax_tree_writer_src") {
] ]
} }
libtint_source_set("libtint_ir_builder_src") { if (tint_build_ir) {
sources = [ libtint_source_set("libtint_ir_builder_src") {
"ir/from_program.cc", sources = [
"ir/from_program.h", "ir/from_program.cc",
"ir/to_program.cc", "ir/from_program.h",
"ir/to_program.h", "ir/to_program.cc",
] "ir/to_program.h",
deps = [ ]
":libtint_ast_src", deps = [
":libtint_constant_src", ":libtint_ast_src",
":libtint_ir_src", ":libtint_constant_src",
":libtint_program_src", ":libtint_ir_src",
":libtint_sem_src", ":libtint_program_src",
":libtint_symbols_src", ":libtint_sem_src",
":libtint_type_src", ":libtint_symbols_src",
":libtint_utils_src", ":libtint_type_src",
] ":libtint_utils_src",
} ]
}
libtint_source_set("libtint_ir_src") { libtint_source_set("libtint_ir_src") {
sources = [ sources = [
"ir/binary.cc", "ir/binary.cc",
"ir/binary.h", "ir/binary.h",
"ir/bitcast.cc", "ir/bitcast.cc",
"ir/bitcast.h", "ir/bitcast.h",
"ir/block.cc", "ir/block.cc",
"ir/block.h", "ir/block.h",
"ir/block_param.cc", "ir/block_param.cc",
"ir/block_param.h", "ir/block_param.h",
"ir/builder.cc", "ir/builder.cc",
"ir/builder.h", "ir/builder.h",
"ir/builtin.cc", "ir/builtin.cc",
"ir/builtin.h", "ir/builtin.h",
"ir/call.cc", "ir/call.cc",
"ir/call.h", "ir/call.h",
"ir/constant.cc", "ir/constant.cc",
"ir/constant.h", "ir/constant.h",
"ir/construct.cc", "ir/construct.cc",
"ir/construct.h", "ir/construct.h",
"ir/convert.cc", "ir/convert.cc",
"ir/convert.h", "ir/convert.h",
"ir/debug.cc", "ir/debug.cc",
"ir/debug.h", "ir/debug.h",
"ir/disassembler.cc", "ir/disassembler.cc",
"ir/disassembler.h", "ir/disassembler.h",
"ir/discard.cc", "ir/discard.cc",
"ir/discard.h", "ir/discard.h",
"ir/flow_node.cc", "ir/flow_node.cc",
"ir/flow_node.h", "ir/flow_node.h",
"ir/function.cc", "ir/function.cc",
"ir/function.h", "ir/function.h",
"ir/function_param.cc", "ir/function_param.cc",
"ir/function_param.h", "ir/function_param.h",
"ir/function_terminator.cc", "ir/function_terminator.cc",
"ir/function_terminator.h", "ir/function_terminator.h",
"ir/if.cc", "ir/if.cc",
"ir/if.h", "ir/if.h",
"ir/instruction.cc", "ir/instruction.cc",
"ir/instruction.h", "ir/instruction.h",
"ir/load.cc", "ir/load.cc",
"ir/load.h", "ir/load.h",
"ir/loop.cc", "ir/loop.cc",
"ir/loop.h", "ir/loop.h",
"ir/module.cc", "ir/module.cc",
"ir/module.h", "ir/module.h",
"ir/root_terminator.cc", "ir/root_terminator.cc",
"ir/root_terminator.h", "ir/root_terminator.h",
"ir/store.cc", "ir/store.cc",
"ir/store.h", "ir/store.h",
"ir/switch.cc", "ir/switch.cc",
"ir/switch.h", "ir/switch.h",
"ir/transform/transform.cc", "ir/transform/transform.cc",
"ir/transform/transform.h", "ir/transform/transform.h",
"ir/unary.cc", "ir/unary.cc",
"ir/unary.h", "ir/unary.h",
"ir/user_call.cc", "ir/user_call.cc",
"ir/user_call.h", "ir/user_call.h",
"ir/value.cc", "ir/value.cc",
"ir/value.h", "ir/value.h",
"ir/var.cc", "ir/var.cc",
"ir/var.h", "ir/var.h",
] ]
deps = [ deps = [
":libtint_builtins_src", ":libtint_builtins_src",
":libtint_constant_src", ":libtint_constant_src",
":libtint_symbols_src", ":libtint_symbols_src",
":libtint_transform_src", ":libtint_transform_src",
":libtint_type_src", ":libtint_type_src",
":libtint_utils_src", ":libtint_utils_src",
] ]
}
} }
source_set("libtint") { source_set("libtint") {
@ -2246,33 +2253,35 @@ if (tint_build_unittests) {
} }
} }
tint_unittests_source_set("tint_unittests_ir_src") { if (tint_build_ir) {
sources = [ tint_unittests_source_set("tint_unittests_ir_src") {
"ir/binary_test.cc", sources = [
"ir/bitcast_test.cc", "ir/binary_test.cc",
"ir/constant_test.cc", "ir/bitcast_test.cc",
"ir/discard_test.cc", "ir/constant_test.cc",
"ir/from_program_binary_test.cc", "ir/discard_test.cc",
"ir/from_program_call_test.cc", "ir/from_program_binary_test.cc",
"ir/from_program_literal_test.cc", "ir/from_program_call_test.cc",
"ir/from_program_materialize_test.cc", "ir/from_program_literal_test.cc",
"ir/from_program_store_test.cc", "ir/from_program_materialize_test.cc",
"ir/from_program_test.cc", "ir/from_program_store_test.cc",
"ir/from_program_unary_test.cc", "ir/from_program_test.cc",
"ir/from_program_var_test.cc", "ir/from_program_unary_test.cc",
"ir/load_test.cc", "ir/from_program_var_test.cc",
"ir/module_test.cc", "ir/load_test.cc",
"ir/store_test.cc", "ir/module_test.cc",
"ir/test_helper.h", "ir/store_test.cc",
"ir/to_program_roundtrip_test.cc", "ir/test_helper.h",
"ir/transform/add_empty_entry_point_test.cc", "ir/to_program_roundtrip_test.cc",
"ir/unary_test.cc", "ir/transform/add_empty_entry_point_test.cc",
] "ir/unary_test.cc",
]
deps = [ deps = [
":libtint_ir_builder_src", ":libtint_ir_builder_src",
":libtint_ir_src", ":libtint_ir_src",
] ]
}
} }
if (build_with_chromium) { if (build_with_chromium) {