2021-03-15 08:43:11 +00:00
|
|
|
# Copyright 2021 The Tint Authors
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
import("//build_overrides/build.gni")
|
|
|
|
import("../tint_overrides_with_defaults.gni")
|
|
|
|
|
|
|
|
# Fuzzers - Libfuzzer based fuzzing targets for Chromium
|
|
|
|
# To run the fuzzers outside of Chromium, use the CMake based builds.
|
|
|
|
|
|
|
|
if (build_with_chromium) {
|
|
|
|
import("//testing/libfuzzer/fuzzer_test.gni")
|
|
|
|
|
2021-07-13 17:11:35 +00:00
|
|
|
fuzzer_corpus_wgsl_dir = "${target_gen_dir}/fuzzer_corpus_wgsl"
|
|
|
|
action("tint_generate_wgsl_corpus") {
|
|
|
|
script = "generate_wgsl_corpus.py"
|
|
|
|
sources = [ "generate_wgsl_corpus.py" ]
|
2021-07-16 20:56:55 +00:00
|
|
|
args = [
|
|
|
|
rebase_path("${tint_root_dir}/test", root_build_dir),
|
|
|
|
rebase_path(fuzzer_corpus_wgsl_dir, root_build_dir),
|
|
|
|
]
|
2021-07-13 17:11:35 +00:00
|
|
|
outputs = [ fuzzer_corpus_wgsl_dir ]
|
|
|
|
}
|
|
|
|
|
2021-09-02 19:59:35 +00:00
|
|
|
tint_fuzzer_common_libfuzzer_options = [
|
|
|
|
"only_ascii=1",
|
|
|
|
"max_len=10000",
|
2021-07-16 20:56:55 +00:00
|
|
|
]
|
|
|
|
|
2021-09-02 19:59:35 +00:00
|
|
|
tint_ast_fuzzer_common_libfuzzer_options =
|
|
|
|
tint_fuzzer_common_libfuzzer_options + [
|
|
|
|
"cross_over=0",
|
|
|
|
"mutate_depth=1",
|
|
|
|
"tint_enable_all_mutations=false",
|
|
|
|
"tint_mutation_batch_size=5",
|
|
|
|
]
|
|
|
|
|
|
|
|
tint_regex_fuzzer_common_libfuzzer_options =
|
|
|
|
tint_fuzzer_common_libfuzzer_options + [
|
|
|
|
"cross_over=0",
|
|
|
|
"mutate_depth=1",
|
|
|
|
]
|
2021-07-29 11:58:18 +00:00
|
|
|
|
2021-03-15 08:43:11 +00:00
|
|
|
# fuzzer_test doesn't have configs members, so need to define them in an empty
|
|
|
|
# source_set.
|
|
|
|
|
|
|
|
source_set("tint_fuzzer_common") {
|
|
|
|
public_configs = [
|
2021-03-15 15:09:11 +00:00
|
|
|
"${tint_root_dir}/src:tint_config",
|
|
|
|
"${tint_root_dir}/src:tint_common_config",
|
2021-03-15 08:43:11 +00:00
|
|
|
]
|
|
|
|
|
2021-04-21 14:58:42 +00:00
|
|
|
public_deps = [
|
|
|
|
"${tint_root_dir}/src:libtint",
|
|
|
|
"${tint_spirv_tools_dir}/:spvtools_val",
|
|
|
|
]
|
2021-03-15 08:43:11 +00:00
|
|
|
|
|
|
|
sources = [
|
2021-09-30 18:58:32 +00:00
|
|
|
"data_builder.h",
|
2021-09-03 00:59:35 +00:00
|
|
|
"random_generator.cc",
|
|
|
|
"random_generator.h",
|
2021-03-15 15:09:11 +00:00
|
|
|
"tint_common_fuzzer.cc",
|
|
|
|
"tint_common_fuzzer.h",
|
2021-09-30 18:58:32 +00:00
|
|
|
"transform_builder.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2021-08-05 15:52:58 +00:00
|
|
|
source_set("tint_fuzzer_common_with_init") {
|
|
|
|
public_deps = [ ":tint_fuzzer_common" ]
|
|
|
|
|
|
|
|
sources = [
|
|
|
|
"cli.cc",
|
|
|
|
"cli.h",
|
2021-09-30 18:58:32 +00:00
|
|
|
"fuzzer_init.cc",
|
|
|
|
"fuzzer_init.h",
|
2021-08-05 15:52:58 +00:00
|
|
|
]
|
|
|
|
}
|
2021-03-15 08:43:11 +00:00
|
|
|
if (tint_build_wgsl_reader) {
|
|
|
|
fuzzer_test("tint_wgsl_reader_fuzzer") {
|
2021-03-15 15:09:11 +00:00
|
|
|
sources = [ "tint_wgsl_reader_fuzzer.cc" ]
|
2021-08-05 15:52:58 +00:00
|
|
|
deps = [ ":tint_fuzzer_common_with_init" ]
|
2021-07-13 17:11:35 +00:00
|
|
|
dict = "dictionary.txt"
|
2021-09-02 19:59:35 +00:00
|
|
|
libfuzzer_options = tint_fuzzer_common_libfuzzer_options
|
2021-07-13 17:11:35 +00:00
|
|
|
seed_corpus = fuzzer_corpus_wgsl_dir
|
|
|
|
seed_corpus_deps = [ ":tint_generate_wgsl_corpus" ]
|
2021-03-15 08:43:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tint_build_wgsl_reader && tint_build_wgsl_writer) {
|
2021-08-25 16:14:43 +00:00
|
|
|
fuzzer_test("tint_ast_clone_fuzzer") {
|
|
|
|
sources = [ "tint_ast_clone_fuzzer.cc" ]
|
|
|
|
deps = [ ":tint_fuzzer_common_with_init" ]
|
|
|
|
dict = "dictionary.txt"
|
2021-09-02 19:59:35 +00:00
|
|
|
libfuzzer_options = tint_fuzzer_common_libfuzzer_options
|
2021-08-25 16:14:43 +00:00
|
|
|
seed_corpus = fuzzer_corpus_wgsl_dir
|
|
|
|
seed_corpus_deps = [ ":tint_generate_wgsl_corpus" ]
|
|
|
|
}
|
|
|
|
|
2021-07-16 20:56:55 +00:00
|
|
|
fuzzer_test("tint_ast_wgsl_writer_fuzzer") {
|
2021-08-31 22:07:17 +00:00
|
|
|
sources = [ "tint_ast_fuzzer/tint_ast_wgsl_writer_fuzzer.cc" ]
|
2021-07-16 20:56:55 +00:00
|
|
|
deps = [ "tint_ast_fuzzer:tint_ast_fuzzer" ]
|
2021-09-03 22:19:26 +00:00
|
|
|
libfuzzer_options = tint_ast_fuzzer_common_libfuzzer_options
|
2021-07-16 20:56:55 +00:00
|
|
|
seed_corpus = fuzzer_corpus_wgsl_dir
|
|
|
|
seed_corpus_deps = [ ":tint_generate_wgsl_corpus" ]
|
|
|
|
}
|
|
|
|
|
2021-07-29 11:58:18 +00:00
|
|
|
fuzzer_test("tint_regex_wgsl_writer_fuzzer") {
|
2021-08-31 22:07:17 +00:00
|
|
|
sources = [ "tint_regex_fuzzer/tint_regex_wgsl_writer_fuzzer.cc" ]
|
2021-07-29 11:58:18 +00:00
|
|
|
deps = [ "tint_regex_fuzzer:tint_regex_fuzzer" ]
|
2021-09-03 23:26:48 +00:00
|
|
|
libfuzzer_options = tint_regex_fuzzer_common_libfuzzer_options
|
2021-07-29 11:58:18 +00:00
|
|
|
seed_corpus = fuzzer_corpus_wgsl_dir
|
|
|
|
seed_corpus_deps = [ ":tint_generate_wgsl_corpus" ]
|
|
|
|
}
|
|
|
|
|
2021-03-15 08:43:11 +00:00
|
|
|
fuzzer_test("tint_wgsl_reader_wgsl_writer_fuzzer") {
|
2021-03-15 15:09:11 +00:00
|
|
|
sources = [ "tint_wgsl_reader_wgsl_writer_fuzzer.cc" ]
|
2021-08-05 15:52:58 +00:00
|
|
|
deps = [ ":tint_fuzzer_common_with_init" ]
|
2021-07-13 17:11:35 +00:00
|
|
|
dict = "dictionary.txt"
|
2021-09-02 19:59:35 +00:00
|
|
|
libfuzzer_options = tint_fuzzer_common_libfuzzer_options
|
2021-07-13 17:11:35 +00:00
|
|
|
seed_corpus = fuzzer_corpus_wgsl_dir
|
|
|
|
seed_corpus_deps = [ ":tint_generate_wgsl_corpus" ]
|
2021-03-15 08:43:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tint_build_wgsl_reader && tint_build_spv_writer) {
|
|
|
|
fuzzer_test("tint_all_transforms_fuzzer") {
|
2021-03-15 15:09:11 +00:00
|
|
|
sources = [ "tint_all_transforms_fuzzer.cc" ]
|
2021-08-05 15:52:58 +00:00
|
|
|
deps = [ ":tint_fuzzer_common_with_init" ]
|
2021-07-13 17:11:35 +00:00
|
|
|
dict = "dictionary.txt"
|
2021-09-02 19:59:35 +00:00
|
|
|
libfuzzer_options = tint_fuzzer_common_libfuzzer_options
|
2021-07-13 17:11:35 +00:00
|
|
|
seed_corpus = fuzzer_corpus_wgsl_dir
|
|
|
|
seed_corpus_deps = [ ":tint_generate_wgsl_corpus" ]
|
2021-03-15 08:43:11 +00:00
|
|
|
}
|
|
|
|
|
2021-07-16 20:56:55 +00:00
|
|
|
fuzzer_test("tint_ast_spv_writer_fuzzer") {
|
2021-08-31 22:07:17 +00:00
|
|
|
sources = [ "tint_ast_fuzzer/tint_ast_spv_writer_fuzzer.cc" ]
|
2021-07-16 20:56:55 +00:00
|
|
|
deps = [ "tint_ast_fuzzer:tint_ast_fuzzer" ]
|
2021-09-03 22:19:26 +00:00
|
|
|
libfuzzer_options = tint_ast_fuzzer_common_libfuzzer_options
|
2021-07-16 20:56:55 +00:00
|
|
|
seed_corpus = fuzzer_corpus_wgsl_dir
|
|
|
|
seed_corpus_deps = [ ":tint_generate_wgsl_corpus" ]
|
|
|
|
}
|
|
|
|
|
2021-04-28 15:35:43 +00:00
|
|
|
fuzzer_test("tint_binding_remapper_fuzzer") {
|
|
|
|
sources = [ "tint_binding_remapper_fuzzer.cc" ]
|
2021-08-05 15:52:58 +00:00
|
|
|
deps = [ ":tint_fuzzer_common_with_init" ]
|
2021-07-13 17:11:35 +00:00
|
|
|
dict = "dictionary.txt"
|
2021-09-02 19:59:35 +00:00
|
|
|
libfuzzer_options = tint_fuzzer_common_libfuzzer_options
|
2021-07-13 17:11:35 +00:00
|
|
|
seed_corpus = fuzzer_corpus_wgsl_dir
|
|
|
|
seed_corpus_deps = [ ":tint_generate_wgsl_corpus" ]
|
2021-04-28 15:35:43 +00:00
|
|
|
}
|
|
|
|
|
2021-03-15 08:43:11 +00:00
|
|
|
fuzzer_test("tint_first_index_offset_fuzzer") {
|
2021-03-15 15:09:11 +00:00
|
|
|
sources = [ "tint_first_index_offset_fuzzer.cc" ]
|
2021-08-05 15:52:58 +00:00
|
|
|
deps = [ ":tint_fuzzer_common_with_init" ]
|
2021-07-13 17:11:35 +00:00
|
|
|
dict = "dictionary.txt"
|
2021-09-02 19:59:35 +00:00
|
|
|
libfuzzer_options = tint_fuzzer_common_libfuzzer_options
|
2021-07-13 17:11:35 +00:00
|
|
|
seed_corpus = fuzzer_corpus_wgsl_dir
|
|
|
|
seed_corpus_deps = [ ":tint_generate_wgsl_corpus" ]
|
2021-03-15 08:43:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fuzzer_test("tint_inspector_fuzzer") {
|
2021-03-15 15:09:11 +00:00
|
|
|
sources = [ "tint_inspector_fuzzer.cc" ]
|
2021-08-05 15:52:58 +00:00
|
|
|
deps = [ ":tint_fuzzer_common_with_init" ]
|
2021-07-13 17:11:35 +00:00
|
|
|
dict = "dictionary.txt"
|
2021-09-02 19:59:35 +00:00
|
|
|
libfuzzer_options = tint_fuzzer_common_libfuzzer_options
|
2021-07-13 17:11:35 +00:00
|
|
|
seed_corpus = fuzzer_corpus_wgsl_dir
|
|
|
|
seed_corpus_deps = [ ":tint_generate_wgsl_corpus" ]
|
2021-03-15 08:43:11 +00:00
|
|
|
}
|
2021-04-29 20:12:05 +00:00
|
|
|
|
2021-07-29 11:58:18 +00:00
|
|
|
fuzzer_test("tint_regex_spv_writer_fuzzer") {
|
2021-08-31 22:07:17 +00:00
|
|
|
sources = [ "tint_regex_fuzzer/tint_regex_spv_writer_fuzzer.cc" ]
|
2021-07-29 11:58:18 +00:00
|
|
|
deps = [ "tint_regex_fuzzer:tint_regex_fuzzer" ]
|
2021-09-03 23:26:48 +00:00
|
|
|
libfuzzer_options = tint_regex_fuzzer_common_libfuzzer_options
|
2021-07-29 11:58:18 +00:00
|
|
|
seed_corpus = fuzzer_corpus_wgsl_dir
|
|
|
|
seed_corpus_deps = [ ":tint_generate_wgsl_corpus" ]
|
|
|
|
}
|
|
|
|
|
2021-04-29 20:43:45 +00:00
|
|
|
fuzzer_test("tint_renamer_fuzzer") {
|
|
|
|
sources = [ "tint_renamer_fuzzer.cc" ]
|
2021-08-05 15:52:58 +00:00
|
|
|
deps = [ ":tint_fuzzer_common_with_init" ]
|
2021-07-13 17:11:35 +00:00
|
|
|
dict = "dictionary.txt"
|
2021-09-02 19:59:35 +00:00
|
|
|
libfuzzer_options = tint_fuzzer_common_libfuzzer_options
|
2021-07-13 17:11:35 +00:00
|
|
|
seed_corpus = fuzzer_corpus_wgsl_dir
|
|
|
|
seed_corpus_deps = [ ":tint_generate_wgsl_corpus" ]
|
2021-04-29 20:43:45 +00:00
|
|
|
}
|
|
|
|
|
2021-06-30 13:23:36 +00:00
|
|
|
fuzzer_test("tint_robustness_fuzzer") {
|
|
|
|
sources = [ "tint_robustness_fuzzer.cc" ]
|
2021-08-05 15:52:58 +00:00
|
|
|
deps = [ ":tint_fuzzer_common_with_init" ]
|
2021-07-13 17:11:35 +00:00
|
|
|
dict = "dictionary.txt"
|
2021-09-02 19:59:35 +00:00
|
|
|
libfuzzer_options = tint_fuzzer_common_libfuzzer_options
|
2021-07-13 17:11:35 +00:00
|
|
|
seed_corpus = fuzzer_corpus_wgsl_dir
|
|
|
|
seed_corpus_deps = [ ":tint_generate_wgsl_corpus" ]
|
2021-06-30 13:23:36 +00:00
|
|
|
}
|
|
|
|
|
2021-04-29 20:49:25 +00:00
|
|
|
fuzzer_test("tint_single_entry_point_fuzzer") {
|
|
|
|
sources = [ "tint_single_entry_point_fuzzer.cc" ]
|
2021-08-05 15:52:58 +00:00
|
|
|
deps = [ ":tint_fuzzer_common_with_init" ]
|
2021-07-13 17:11:35 +00:00
|
|
|
dict = "dictionary.txt"
|
2021-09-02 19:59:35 +00:00
|
|
|
libfuzzer_options = tint_fuzzer_common_libfuzzer_options
|
2021-07-13 17:11:35 +00:00
|
|
|
seed_corpus = fuzzer_corpus_wgsl_dir
|
|
|
|
seed_corpus_deps = [ ":tint_generate_wgsl_corpus" ]
|
2021-04-29 20:49:25 +00:00
|
|
|
}
|
|
|
|
|
2021-05-06 15:43:33 +00:00
|
|
|
fuzzer_test("tint_vertex_pulling_fuzzer") {
|
|
|
|
sources = [ "tint_vertex_pulling_fuzzer.cc" ]
|
2021-08-05 15:52:58 +00:00
|
|
|
deps = [ ":tint_fuzzer_common_with_init" ]
|
2021-07-13 17:11:35 +00:00
|
|
|
dict = "dictionary.txt"
|
2021-09-02 19:59:35 +00:00
|
|
|
libfuzzer_options = tint_fuzzer_common_libfuzzer_options
|
2021-07-13 17:11:35 +00:00
|
|
|
seed_corpus = fuzzer_corpus_wgsl_dir
|
|
|
|
seed_corpus_deps = [ ":tint_generate_wgsl_corpus" ]
|
2021-05-06 15:43:33 +00:00
|
|
|
}
|
|
|
|
|
2021-04-29 20:43:45 +00:00
|
|
|
fuzzer_test("tint_wgsl_reader_spv_writer_fuzzer") {
|
|
|
|
sources = [ "tint_wgsl_reader_spv_writer_fuzzer.cc" ]
|
2021-08-05 15:52:58 +00:00
|
|
|
deps = [ ":tint_fuzzer_common_with_init" ]
|
2021-07-13 17:11:35 +00:00
|
|
|
dict = "dictionary.txt"
|
2021-09-02 19:59:35 +00:00
|
|
|
libfuzzer_options = tint_fuzzer_common_libfuzzer_options
|
2021-07-13 17:11:35 +00:00
|
|
|
seed_corpus = fuzzer_corpus_wgsl_dir
|
|
|
|
seed_corpus_deps = [ ":tint_generate_wgsl_corpus" ]
|
2021-04-29 20:43:45 +00:00
|
|
|
}
|
2021-03-15 08:43:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (tint_build_wgsl_reader && tint_build_hlsl_writer) {
|
2021-07-16 20:56:55 +00:00
|
|
|
fuzzer_test("tint_ast_hlsl_writer_fuzzer") {
|
2021-08-31 22:07:17 +00:00
|
|
|
sources = [ "tint_ast_fuzzer/tint_ast_hlsl_writer_fuzzer.cc" ]
|
2021-07-16 20:56:55 +00:00
|
|
|
deps = [ "tint_ast_fuzzer:tint_ast_fuzzer" ]
|
2021-09-03 22:19:26 +00:00
|
|
|
libfuzzer_options = tint_ast_fuzzer_common_libfuzzer_options
|
2021-07-16 20:56:55 +00:00
|
|
|
seed_corpus = fuzzer_corpus_wgsl_dir
|
|
|
|
seed_corpus_deps = [ ":tint_generate_wgsl_corpus" ]
|
|
|
|
}
|
|
|
|
|
2021-07-29 11:58:18 +00:00
|
|
|
fuzzer_test("tint_regex_hlsl_writer_fuzzer") {
|
2021-08-31 22:07:17 +00:00
|
|
|
sources = [ "tint_regex_fuzzer/tint_regex_hlsl_writer_fuzzer.cc" ]
|
2021-07-29 11:58:18 +00:00
|
|
|
deps = [ "tint_regex_fuzzer:tint_regex_fuzzer" ]
|
2021-09-03 23:26:48 +00:00
|
|
|
libfuzzer_options = tint_regex_fuzzer_common_libfuzzer_options
|
2021-07-29 11:58:18 +00:00
|
|
|
seed_corpus = fuzzer_corpus_wgsl_dir
|
|
|
|
seed_corpus_deps = [ ":tint_generate_wgsl_corpus" ]
|
|
|
|
}
|
|
|
|
|
2021-03-15 08:43:11 +00:00
|
|
|
fuzzer_test("tint_wgsl_reader_hlsl_writer_fuzzer") {
|
2021-03-15 15:09:11 +00:00
|
|
|
sources = [ "tint_wgsl_reader_hlsl_writer_fuzzer.cc" ]
|
2021-08-05 15:52:58 +00:00
|
|
|
deps = [ ":tint_fuzzer_common_with_init" ]
|
2021-07-13 17:11:35 +00:00
|
|
|
dict = "dictionary.txt"
|
2021-09-02 19:59:35 +00:00
|
|
|
libfuzzer_options = tint_fuzzer_common_libfuzzer_options
|
2021-07-13 17:11:35 +00:00
|
|
|
seed_corpus = fuzzer_corpus_wgsl_dir
|
|
|
|
seed_corpus_deps = [ ":tint_generate_wgsl_corpus" ]
|
2021-03-15 08:43:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tint_build_wgsl_reader && tint_build_msl_writer) {
|
2021-07-16 20:56:55 +00:00
|
|
|
fuzzer_test("tint_ast_msl_writer_fuzzer") {
|
2021-08-31 22:07:17 +00:00
|
|
|
sources = [ "tint_ast_fuzzer/tint_ast_msl_writer_fuzzer.cc" ]
|
2021-07-16 20:56:55 +00:00
|
|
|
deps = [ "tint_ast_fuzzer:tint_ast_fuzzer" ]
|
2021-09-03 22:19:26 +00:00
|
|
|
libfuzzer_options = tint_ast_fuzzer_common_libfuzzer_options
|
2021-07-16 20:56:55 +00:00
|
|
|
seed_corpus = fuzzer_corpus_wgsl_dir
|
|
|
|
seed_corpus_deps = [ ":tint_generate_wgsl_corpus" ]
|
|
|
|
}
|
|
|
|
|
2021-07-29 11:58:18 +00:00
|
|
|
fuzzer_test("tint_regex_msl_writer_fuzzer") {
|
2021-08-31 22:07:17 +00:00
|
|
|
sources = [ "tint_regex_fuzzer/tint_regex_msl_writer_fuzzer.cc" ]
|
2021-07-29 11:58:18 +00:00
|
|
|
deps = [ "tint_regex_fuzzer:tint_regex_fuzzer" ]
|
2021-09-03 23:26:48 +00:00
|
|
|
libfuzzer_options = tint_regex_fuzzer_common_libfuzzer_options
|
2021-07-29 11:58:18 +00:00
|
|
|
seed_corpus = fuzzer_corpus_wgsl_dir
|
|
|
|
seed_corpus_deps = [ ":tint_generate_wgsl_corpus" ]
|
|
|
|
}
|
|
|
|
|
2021-03-15 08:43:11 +00:00
|
|
|
fuzzer_test("tint_wgsl_reader_msl_writer_fuzzer") {
|
2021-03-15 15:09:11 +00:00
|
|
|
sources = [ "tint_wgsl_reader_msl_writer_fuzzer.cc" ]
|
2021-08-05 15:52:58 +00:00
|
|
|
deps = [ ":tint_fuzzer_common_with_init" ]
|
2021-07-13 17:11:35 +00:00
|
|
|
dict = "dictionary.txt"
|
2021-09-02 19:59:35 +00:00
|
|
|
libfuzzer_options = tint_fuzzer_common_libfuzzer_options
|
2021-07-13 17:11:35 +00:00
|
|
|
seed_corpus = fuzzer_corpus_wgsl_dir
|
|
|
|
seed_corpus_deps = [ ":tint_generate_wgsl_corpus" ]
|
2021-03-15 08:43:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-09-02 15:55:01 +00:00
|
|
|
if (tint_build_wgsl_reader && tint_build_hlsl_writer &&
|
|
|
|
tint_build_msl_writer && tint_build_spv_writer &&
|
|
|
|
tint_build_wgsl_writer) {
|
|
|
|
executable("tint_black_box_fuzz_target") {
|
|
|
|
sources = [ "tint_black_box_fuzz_target.cc" ]
|
|
|
|
deps = [ ":tint_fuzzer_common" ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-03-15 08:43:11 +00:00
|
|
|
group("fuzzers") {
|
|
|
|
testonly = true
|
|
|
|
deps = []
|
|
|
|
|
|
|
|
if (tint_build_wgsl_reader) {
|
|
|
|
deps += [ ":tint_wgsl_reader_fuzzer" ]
|
|
|
|
}
|
|
|
|
if (tint_build_wgsl_reader && tint_build_wgsl_writer) {
|
2021-07-16 20:56:55 +00:00
|
|
|
deps += [
|
2021-08-25 16:14:43 +00:00
|
|
|
":tint_ast_clone_fuzzer",
|
2021-07-16 20:56:55 +00:00
|
|
|
":tint_ast_wgsl_writer_fuzzer",
|
2021-07-29 11:58:18 +00:00
|
|
|
":tint_regex_wgsl_writer_fuzzer",
|
2021-07-16 20:56:55 +00:00
|
|
|
":tint_wgsl_reader_wgsl_writer_fuzzer",
|
|
|
|
]
|
2021-03-15 08:43:11 +00:00
|
|
|
}
|
|
|
|
if (tint_build_wgsl_reader && tint_build_spv_writer) {
|
|
|
|
deps += [
|
|
|
|
":tint_all_transforms_fuzzer",
|
2021-07-16 20:56:55 +00:00
|
|
|
":tint_ast_spv_writer_fuzzer",
|
2021-04-28 15:35:43 +00:00
|
|
|
":tint_binding_remapper_fuzzer",
|
2021-03-15 08:43:11 +00:00
|
|
|
":tint_first_index_offset_fuzzer",
|
|
|
|
":tint_inspector_fuzzer",
|
2021-07-29 11:58:18 +00:00
|
|
|
":tint_regex_spv_writer_fuzzer",
|
2021-04-29 20:43:45 +00:00
|
|
|
":tint_renamer_fuzzer",
|
2021-07-16 20:56:55 +00:00
|
|
|
":tint_robustness_fuzzer",
|
2021-04-29 20:49:25 +00:00
|
|
|
":tint_single_entry_point_fuzzer",
|
2021-05-06 15:43:33 +00:00
|
|
|
":tint_vertex_pulling_fuzzer",
|
2021-03-15 08:43:11 +00:00
|
|
|
":tint_wgsl_reader_spv_writer_fuzzer",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
if (tint_build_wgsl_reader && tint_build_hlsl_writer) {
|
2021-04-29 20:03:35 +00:00
|
|
|
deps += [
|
2021-07-16 20:56:55 +00:00
|
|
|
":tint_ast_hlsl_writer_fuzzer",
|
2021-07-29 11:58:18 +00:00
|
|
|
":tint_regex_hlsl_writer_fuzzer",
|
2021-04-29 20:03:35 +00:00
|
|
|
":tint_wgsl_reader_hlsl_writer_fuzzer",
|
|
|
|
]
|
2021-03-15 08:43:11 +00:00
|
|
|
}
|
|
|
|
if (tint_build_wgsl_reader && tint_build_msl_writer) {
|
2021-04-29 20:06:25 +00:00
|
|
|
deps += [
|
2021-07-16 20:56:55 +00:00
|
|
|
":tint_ast_msl_writer_fuzzer",
|
2021-07-29 11:58:18 +00:00
|
|
|
":tint_regex_msl_writer_fuzzer",
|
2021-04-29 20:06:25 +00:00
|
|
|
":tint_wgsl_reader_msl_writer_fuzzer",
|
|
|
|
]
|
2021-03-15 08:43:11 +00:00
|
|
|
}
|
2021-09-15 05:26:14 +00:00
|
|
|
if (tint_build_wgsl_reader && tint_build_hlsl_writer &&
|
|
|
|
tint_build_msl_writer && tint_build_spv_writer &&
|
|
|
|
tint_build_wgsl_writer) {
|
|
|
|
deps += [ ":tint_black_box_fuzz_target" ]
|
|
|
|
}
|
2021-03-15 08:43:11 +00:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
group("fuzzers") {
|
|
|
|
}
|
|
|
|
}
|