Fix tint fuzzer build

Enable the fuzzers for Kokoro presubmits so we can actually know when we break it.

Change-Id: I7270390045353f79c27a7f661afcc7e888628fcd
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/53385
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Ben Clayton 2021-06-07 08:07:11 +00:00 committed by Tint LUCI CQ
parent 03d10721e7
commit 6b358c3f21
3 changed files with 6 additions and 4 deletions

View File

@ -14,6 +14,7 @@
#include "fuzzers/tint_common_fuzzer.h" #include "fuzzers/tint_common_fuzzer.h"
#include <cstring>
#include <memory> #include <memory>
#include <string> #include <string>
#include <utility> #include <utility>
@ -21,7 +22,6 @@
#include "src/ast/module.h" #include "src/ast/module.h"
#include "src/program.h" #include "src/program.h"
#include "src/program_builder.h"
namespace tint { namespace tint {
namespace fuzzers { namespace fuzzers {
@ -106,14 +106,14 @@ void ExtractBindingRemapperInputs(Reader* r, tint::transform::DataMap* inputs) {
std::vector<Config> configs = r->vector<Config>(); std::vector<Config> configs = r->vector<Config>();
transform::BindingRemapper::BindingPoints binding_points; transform::BindingRemapper::BindingPoints binding_points;
transform::BindingRemapper::Accesses accesses; transform::BindingRemapper::AccessControls accesses;
for (const auto& config : configs) { for (const auto& config : configs) {
binding_points[{config.old_binding, config.old_group}] = { binding_points[{config.old_binding, config.old_group}] = {
config.new_binding, config.new_group}; config.new_binding, config.new_group};
accesss[{config.old_binding, config.old_group}] = config.new_access; accesses[{config.old_binding, config.old_group}] = config.new_access;
} }
inputs->Add<transform::BindingRemapper::Remappings>(binding_points, accesss); inputs->Add<transform::BindingRemapper::Remappings>(binding_points, accesses);
} }
void ExtractFirstIndexOffsetInputs(Reader* r, void ExtractFirstIndexOffsetInputs(Reader* r,

View File

@ -15,6 +15,7 @@
#ifndef FUZZERS_TINT_COMMON_FUZZER_H_ #ifndef FUZZERS_TINT_COMMON_FUZZER_H_
#define FUZZERS_TINT_COMMON_FUZZER_H_ #define FUZZERS_TINT_COMMON_FUZZER_H_
#include <cstring>
#include <string> #include <string>
#include <utility> #include <utility>
#include <vector> #include <vector>

View File

@ -89,6 +89,7 @@ if [ "$BUILD_SYSTEM" == "cmake" ]; then
if [ "$BUILD_TOOLCHAIN" == "clang" ]; then if [ "$BUILD_TOOLCHAIN" == "clang" ]; then
using clang-10.0.0 using clang-10.0.0
COMMON_CMAKE_FLAGS+=" -DTINT_BUILD_FUZZERS=1"
elif [ "$BUILD_TOOLCHAIN" == "gcc" ]; then elif [ "$BUILD_TOOLCHAIN" == "gcc" ]; then
using gcc-9 using gcc-9
fi fi