Resolve some reader/writer dependency issues
The HLSL/MSL includes in data_builder.h appear unused, but gn was flagging them as problematic when attempting to build with the corresponding tint_build flags disabled. module_clone_test.cc is dependent on the WGSL reader and writer, but was not gated on the corresponding tint_build flags in BUILD.gn. tint_unittests_transform and tint_unittests_glsl_writer were both dependent on the WGSL reader/writer, so added it as an explicit dependency. Bug: dawn:286 Change-Id: I20906414e8173065eef9403c9e9c05286afeaee9 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117580 Auto-Submit: Brandon Jones <bajones@chromium.org> Commit-Queue: Dan Sinclair <dsinclair@chromium.org> Reviewed-by: Dan Sinclair <dsinclair@chromium.org> Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
parent
c98d57d662
commit
6c8aa8aff9
|
@ -1205,7 +1205,6 @@ if (tint_build_unittests) {
|
|||
"ast/loop_statement_test.cc",
|
||||
"ast/matrix_test.cc",
|
||||
"ast/member_accessor_expression_test.cc",
|
||||
"ast/module_clone_test.cc",
|
||||
"ast/module_test.cc",
|
||||
"ast/multisampled_texture_test.cc",
|
||||
"ast/phony_expression_test.cc",
|
||||
|
@ -1234,6 +1233,11 @@ if (tint_build_unittests) {
|
|||
"ast/workgroup_attribute_test.cc",
|
||||
]
|
||||
deps = [ ":libtint_transform_src" ]
|
||||
|
||||
if (tint_build_wgsl_reader && tint_build_wgsl_writer) {
|
||||
# This AST test relies on the WGSL reader and writer
|
||||
sources += [ "ast/module_clone_test.cc" ]
|
||||
}
|
||||
}
|
||||
|
||||
tint_unittests_source_set("tint_unittests_diagnostic_src") {
|
||||
|
@ -1432,7 +1436,11 @@ if (tint_build_unittests) {
|
|||
"transform/zero_init_workgroup_memory_test.cc",
|
||||
]
|
||||
|
||||
deps = [ ":libtint_transform_src" ]
|
||||
deps = [
|
||||
":libtint_transform_src",
|
||||
":libtint_wgsl_reader_src",
|
||||
":libtint_wgsl_writer_src",
|
||||
]
|
||||
}
|
||||
|
||||
tint_unittests_source_set("tint_unittests_utils_src") {
|
||||
|
@ -1511,6 +1519,7 @@ if (tint_build_unittests) {
|
|||
|
||||
deps = [
|
||||
":libtint_spv_reader_src",
|
||||
":libtint_wgsl_writer_src",
|
||||
"${tint_spirv_tools_dir}/:spvtools_opt",
|
||||
]
|
||||
}
|
||||
|
@ -1804,7 +1813,6 @@ if (tint_build_unittests) {
|
|||
":libtint_glsl_writer_src",
|
||||
":libtint_transform_src",
|
||||
":tint_unittests_ast_src",
|
||||
":tint_unittests_transform_src",
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -855,7 +855,6 @@ if(TINT_BUILD_TESTS)
|
|||
ast/loop_statement_test.cc
|
||||
ast/matrix_test.cc
|
||||
ast/member_accessor_expression_test.cc
|
||||
ast/module_clone_test.cc
|
||||
ast/module_test.cc
|
||||
ast/multisampled_texture_test.cc
|
||||
ast/phony_expression_test.cc
|
||||
|
@ -1228,6 +1227,7 @@ if(TINT_BUILD_TESTS)
|
|||
|
||||
if(${TINT_BUILD_WGSL_READER} AND ${TINT_BUILD_WGSL_WRITER})
|
||||
list(APPEND TINT_TEST_SRCS
|
||||
ast/module_clone_test.cc
|
||||
transform/add_empty_entry_point_test.cc
|
||||
transform/add_block_attribute_test.cc
|
||||
transform/array_length_from_uniform_test.cc
|
||||
|
|
|
@ -22,7 +22,6 @@ namespace tint::ast {
|
|||
namespace {
|
||||
|
||||
TEST(ModuleCloneTest, Clone) {
|
||||
#if TINT_BUILD_WGSL_READER && TINT_BUILD_WGSL_WRITER
|
||||
// Shader that exercises the bulk of the AST nodes and types.
|
||||
// See also fuzzers/tint_ast_clone_fuzzer.cc for further coverage of cloning.
|
||||
Source::File file("test.wgsl", R"(struct S0 {
|
||||
|
@ -170,11 +169,6 @@ const declaration_order_check_4 : i32 = 1;
|
|||
ASSERT_TRUE(result.success);
|
||||
auto dst_wgsl = result.wgsl;
|
||||
ASSERT_EQ(src_wgsl, dst_wgsl);
|
||||
|
||||
#else // #if TINT_BUILD_WGSL_READER && TINT_BUILD_WGSL_WRITER
|
||||
GTEST_SKIP() << "ModuleCloneTest requires TINT_BUILD_WGSL_READER and "
|
||||
"TINT_BUILD_WGSL_WRITER to be enabled";
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -23,8 +23,6 @@
|
|||
#include <vector>
|
||||
|
||||
#include "src/tint/fuzzers/random_generator.h"
|
||||
#include "src/tint/writer/hlsl/generator.h"
|
||||
#include "src/tint/writer/msl/generator.h"
|
||||
|
||||
namespace tint::fuzzers {
|
||||
|
||||
|
|
Loading…
Reference in New Issue