mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-08 13:14:56 +00:00
[msl-writer] Support MSL compiler validation in unit tests
The MSL writer GTest harness (TestHelper) now provides a function to invoke the XCode SDK Metal compiler for the MSL output of a given tint::Program. The tint_unittests binary now provides the `--validate-msl` and `--xcrun-path` command-line flags to optionally enable MSL validation and to configure its path. The MSL validation logic itself is conditionally compiled based on the TINT_BUILD_MSL_WRITER define. The TINT_BUILD_* flags were previously not propagated to the GTest binary which this CL addresses by linking the common/public tint configs when building the tint_unittests_main target. Bug: tint:535 Fixed: tint:696 Change-Id: I08b1c36ba59c606ef6cffa5fa5454fd8cf8b035d Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/45800 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Arman Uguray <armansito@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
f8313e5a6e
commit
d13982ff2e
@@ -88,6 +88,7 @@ source_set("tint_unittests_main") {
|
||||
sources = [ "//gpu/tint_unittests_main.cc" ]
|
||||
} else {
|
||||
sources = [ "../src/test_main.cc" ]
|
||||
deps += [ "${tint_root_dir}/src:libtint" ]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -538,6 +539,7 @@ source_set("tint_unittests_msl_writer_src") {
|
||||
"../src/writer/msl/generator_impl_type_test.cc",
|
||||
"../src/writer/msl/generator_impl_unary_op_test.cc",
|
||||
"../src/writer/msl/generator_impl_variable_decl_statement_test.cc",
|
||||
"../src/writer/msl/test_helper.cc",
|
||||
"../src/writer/msl/test_helper.h",
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user