Fix building fuzzer
BUG=tint:53 Change-Id: I0462baf302d5183b089dbdfd595045f8376f7a53 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/20145 Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
parent
c9308dcb75
commit
3170bebba1
|
@ -152,7 +152,7 @@ add_subdirectory(src)
|
|||
add_subdirectory(samples)
|
||||
|
||||
if (${TINT_BUILD_FUZZERS})
|
||||
if (NOT ${TINT_BUILD_WGSL_READER)
|
||||
if (NOT ${TINT_BUILD_WGSL_READER})
|
||||
message(ERROR, "Fuzzers require WGSL reader to be enabled")
|
||||
endif()
|
||||
|
||||
|
|
|
@ -19,7 +19,8 @@
|
|||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
std::string str(reinterpret_cast<const char*>(data), size);
|
||||
|
||||
tint::reader::wgsl::Parser parser(str);
|
||||
tint::Context ctx;
|
||||
tint::reader::wgsl::Parser parser(&ctx, str);
|
||||
parser.Parse();
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue