[tint][ir] Guard transform source sets in GN build

These sources cannot build without the IR being explicitly enabled, as
they depend on code in headers that would be `#ifdef`'d out.

Change-Id: Id542f41679c3e6e6f210ca632e85ca796e61a746
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133402
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: James Price <jrprice@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Kokoro: James Price <jrprice@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
James Price 2023-05-17 20:04:56 +00:00 committed by Dawn LUCI CQ
parent 54d1d714ce
commit c42014805a
1 changed files with 26 additions and 22 deletions

View File

@ -505,18 +505,20 @@ libtint_source_set("libtint_ast_transform_src") {
] ]
} }
libtint_source_set("libtint_ir_transform_src") { if (tint_build_ir) {
sources = [ libtint_source_set("libtint_ir_transform_src") {
"ir/transform/add_empty_entry_point.cc", sources = [
"ir/transform/add_empty_entry_point.h", "ir/transform/add_empty_entry_point.cc",
] "ir/transform/add_empty_entry_point.h",
deps = [ ]
":libtint_builtins_src", deps = [
":libtint_ir_src", ":libtint_builtins_src",
":libtint_symbols_src", ":libtint_ir_src",
":libtint_type_src", ":libtint_symbols_src",
":libtint_utils_src", ":libtint_type_src",
] ":libtint_utils_src",
]
}
} }
libtint_source_set("libtint_ast_hdrs") { libtint_source_set("libtint_ast_hdrs") {
@ -1770,17 +1772,19 @@ if (tint_build_unittests) {
] ]
} }
tint_unittests_source_set("tint_unittests_ir_transform_src") { if (tint_build_ir) {
sources = [ tint_unittests_source_set("tint_unittests_ir_transform_src") {
"ir/transform/add_empty_entry_point_test.cc", sources = [
"ir/transform/test_helper.h", "ir/transform/add_empty_entry_point_test.cc",
] "ir/transform/test_helper.h",
]
deps = [ deps = [
":libtint_ir_src", ":libtint_ir_src",
":libtint_ir_transform_src", ":libtint_ir_transform_src",
":libtint_transform_manager_src", ":libtint_transform_manager_src",
] ]
}
} }
tint_unittests_source_set("tint_unittests_utils_src") { tint_unittests_source_set("tint_unittests_utils_src") {