| Index: BUILD.gn
|
| diff --git a/BUILD.gn b/BUILD.gn
|
| index c2c8732a63af9ead9e822c2359183e9dbb263a78..04093547f5de65bca40d2ca11d22d10ab508ee7a 100644
|
| --- a/BUILD.gn
|
| +++ b/BUILD.gn
|
| @@ -2386,36 +2386,38 @@ v8_source_set("v8_libsampler") {
|
| ]
|
| }
|
|
|
| -v8_source_set("fuzzer_support") {
|
| - visibility = [ ":*" ] # Only targets in this file can depend on this.
|
| +if (v8_enable_fuzzers) {
|
| + v8_source_set("fuzzer_support") {
|
| + visibility = [ ":*" ] # Only targets in this file can depend on this.
|
|
|
| - sources = [
|
| - "test/fuzzer/fuzzer-support.cc",
|
| - "test/fuzzer/fuzzer-support.h",
|
| - ]
|
| + sources = [
|
| + "test/fuzzer/fuzzer-support.cc",
|
| + "test/fuzzer/fuzzer-support.h",
|
| + ]
|
|
|
| - configs = [ ":internal_config_base" ]
|
| + configs = [ ":internal_config_base" ]
|
|
|
| - deps = [
|
| - ":v8",
|
| - ]
|
| + deps = [
|
| + ":v8",
|
| + ]
|
|
|
| - public_deps = [
|
| - ":v8_libbase",
|
| - ":v8_libplatform",
|
| - ]
|
| + public_deps = [
|
| + ":v8_libbase",
|
| + ":v8_libplatform",
|
| + ]
|
|
|
| - if (v8_enable_i18n_support) {
|
| - deps += [ "//third_party/icu" ]
|
| + if (v8_enable_i18n_support) {
|
| + deps += [ "//third_party/icu" ]
|
| + }
|
| }
|
| -}
|
|
|
| -v8_source_set("simple_fuzzer") {
|
| - sources = [
|
| - "test/fuzzer/fuzzer.cc",
|
| - ]
|
| + v8_source_set("simple_fuzzer") {
|
| + sources = [
|
| + "test/fuzzer/fuzzer.cc",
|
| + ]
|
|
|
| - configs = [ ":internal_config_base" ]
|
| + configs = [ ":internal_config_base" ]
|
| + }
|
| }
|
|
|
| ###############################################################################
|
| @@ -2489,15 +2491,20 @@ group("gn_all") {
|
| ":v8_hello_world",
|
| ":v8_parser_shell",
|
| ":v8_sample_process",
|
| - ":v8_simple_json_fuzzer",
|
| - ":v8_simple_parser_fuzzer",
|
| - ":v8_simple_regexp_fuzzer",
|
| - ":v8_simple_wasm_asmjs_fuzzer",
|
| - ":v8_simple_wasm_fuzzer",
|
| "test:gn_all",
|
| "tools:gn_all",
|
| ]
|
|
|
| + if (v8_enable_fuzzers) {
|
| + deps += [
|
| + ":v8_simple_json_fuzzer",
|
| + ":v8_simple_parser_fuzzer",
|
| + ":v8_simple_regexp_fuzzer",
|
| + ":v8_simple_wasm_asmjs_fuzzer",
|
| + ":v8_simple_wasm_fuzzer",
|
| + ]
|
| + }
|
| +
|
| if (want_v8_shell) {
|
| deps += [ ":v8_shell" ]
|
| }
|
| @@ -2690,27 +2697,10 @@ if (want_v8_shell) {
|
| }
|
| }
|
|
|
| -template("v8_fuzzer") {
|
| - name = target_name
|
| - forward_variables_from(invoker, "*")
|
| - v8_executable("v8_simple_" + name) {
|
| - deps = [
|
| - ":" + name,
|
| - ":simple_fuzzer",
|
| - "//build/win:default_exe_manifest",
|
| - ]
|
| -
|
| - configs = [ ":external_config" ]
|
| - }
|
| -}
|
| -
|
| -v8_source_set("json_fuzzer") {
|
| +v8_source_set("wasm_module_runner") {
|
| sources = [
|
| - "test/fuzzer/json.cc",
|
| - ]
|
| -
|
| - deps = [
|
| - ":fuzzer_support",
|
| + "test/common/wasm/wasm-module-runner.cc",
|
| + "test/common/wasm/wasm-module-runner.h",
|
| ]
|
|
|
| configs = [
|
| @@ -2719,16 +2709,9 @@ v8_source_set("json_fuzzer") {
|
| ]
|
| }
|
|
|
| -v8_fuzzer("json_fuzzer") {
|
| -}
|
| -
|
| -v8_source_set("parser_fuzzer") {
|
| +v8_source_set("wasm_test_signatures") {
|
| sources = [
|
| - "test/fuzzer/parser.cc",
|
| - ]
|
| -
|
| - deps = [
|
| - ":fuzzer_support",
|
| + "test/common/wasm/test-signatures.h",
|
| ]
|
|
|
| configs = [
|
| @@ -2737,276 +2720,302 @@ v8_source_set("parser_fuzzer") {
|
| ]
|
| }
|
|
|
| -v8_fuzzer("parser_fuzzer") {
|
| -}
|
| +if (v8_enable_fuzzers) {
|
| + template("v8_fuzzer") {
|
| + name = target_name
|
| + forward_variables_from(invoker, "*")
|
| + v8_executable("v8_simple_" + name) {
|
| + deps = [
|
| + ":" + name,
|
| + ":simple_fuzzer",
|
| + "//build/win:default_exe_manifest",
|
| + ]
|
|
|
| -v8_source_set("regexp_fuzzer") {
|
| - sources = [
|
| - "test/fuzzer/regexp.cc",
|
| - ]
|
| + configs = [ ":external_config" ]
|
| + }
|
| + }
|
|
|
| - deps = [
|
| - ":fuzzer_support",
|
| - ]
|
| + v8_source_set("json_fuzzer") {
|
| + sources = [
|
| + "test/fuzzer/json.cc",
|
| + ]
|
|
|
| - configs = [
|
| - ":external_config",
|
| - ":internal_config_base",
|
| - ]
|
| -}
|
| + deps = [
|
| + ":fuzzer_support",
|
| + ]
|
|
|
| -v8_fuzzer("regexp_fuzzer") {
|
| -}
|
| + configs = [
|
| + ":external_config",
|
| + ":internal_config_base",
|
| + ]
|
| + }
|
|
|
| -v8_source_set("wasm_module_runner") {
|
| - sources = [
|
| - "test/common/wasm/wasm-module-runner.cc",
|
| - "test/common/wasm/wasm-module-runner.h",
|
| - ]
|
| + v8_fuzzer("json_fuzzer") {
|
| + }
|
|
|
| - configs = [
|
| - ":external_config",
|
| - ":internal_config_base",
|
| - ]
|
| -}
|
| + v8_source_set("parser_fuzzer") {
|
| + sources = [
|
| + "test/fuzzer/parser.cc",
|
| + ]
|
|
|
| -v8_source_set("wasm_test_signatures") {
|
| - sources = [
|
| - "test/common/wasm/test-signatures.h",
|
| - ]
|
| + deps = [
|
| + ":fuzzer_support",
|
| + ]
|
|
|
| - configs = [
|
| - ":external_config",
|
| - ":internal_config_base",
|
| - ]
|
| -}
|
| + configs = [
|
| + ":external_config",
|
| + ":internal_config_base",
|
| + ]
|
| + }
|
|
|
| -v8_source_set("wasm_fuzzer") {
|
| - sources = [
|
| - "test/fuzzer/wasm.cc",
|
| - ]
|
| + v8_fuzzer("parser_fuzzer") {
|
| + }
|
|
|
| - deps = [
|
| - ":fuzzer_support",
|
| - ":wasm_module_runner",
|
| - ]
|
| + v8_source_set("regexp_fuzzer") {
|
| + sources = [
|
| + "test/fuzzer/regexp.cc",
|
| + ]
|
|
|
| - configs = [
|
| - ":external_config",
|
| - ":internal_config_base",
|
| - ]
|
| -}
|
| + deps = [
|
| + ":fuzzer_support",
|
| + ]
|
|
|
| -v8_fuzzer("wasm_fuzzer") {
|
| -}
|
| + configs = [
|
| + ":external_config",
|
| + ":internal_config_base",
|
| + ]
|
| + }
|
|
|
| -v8_source_set("wasm_asmjs_fuzzer") {
|
| - sources = [
|
| - "test/fuzzer/wasm-asmjs.cc",
|
| - ]
|
| + v8_fuzzer("regexp_fuzzer") {
|
| + }
|
|
|
| - deps = [
|
| - ":fuzzer_support",
|
| - ":wasm_module_runner",
|
| - ]
|
| + v8_source_set("wasm_fuzzer") {
|
| + sources = [
|
| + "test/fuzzer/wasm.cc",
|
| + ]
|
|
|
| - configs = [
|
| - ":external_config",
|
| - ":internal_config_base",
|
| - ]
|
| -}
|
| + deps = [
|
| + ":fuzzer_support",
|
| + ":wasm_module_runner",
|
| + ]
|
|
|
| -v8_fuzzer("wasm_asmjs_fuzzer") {
|
| -}
|
| + configs = [
|
| + ":external_config",
|
| + ":internal_config_base",
|
| + ]
|
| + }
|
|
|
| -v8_source_set("wasm_code_fuzzer") {
|
| - sources = [
|
| - "test/fuzzer/wasm-code.cc",
|
| - ]
|
| + v8_fuzzer("wasm_fuzzer") {
|
| + }
|
|
|
| - deps = [
|
| - ":fuzzer_support",
|
| - ":wasm_module_runner",
|
| - ":wasm_test_signatures",
|
| - ]
|
| + v8_source_set("wasm_asmjs_fuzzer") {
|
| + sources = [
|
| + "test/fuzzer/wasm-asmjs.cc",
|
| + ]
|
|
|
| - configs = [
|
| - ":external_config",
|
| - ":internal_config_base",
|
| - ]
|
| -}
|
| + deps = [
|
| + ":fuzzer_support",
|
| + ":wasm_module_runner",
|
| + ]
|
|
|
| -v8_fuzzer("wasm_code_fuzzer") {
|
| -}
|
| + configs = [
|
| + ":external_config",
|
| + ":internal_config_base",
|
| + ]
|
| + }
|
|
|
| -v8_source_set("wasm_call_fuzzer") {
|
| - sources = [
|
| - "test/fuzzer/wasm-call.cc",
|
| - ]
|
| + v8_fuzzer("wasm_asmjs_fuzzer") {
|
| + }
|
|
|
| - deps = [
|
| - ":fuzzer_support",
|
| - ":wasm_module_runner",
|
| - ":wasm_test_signatures",
|
| - ]
|
| + v8_source_set("wasm_code_fuzzer") {
|
| + sources = [
|
| + "test/fuzzer/wasm-code.cc",
|
| + ]
|
|
|
| - configs = [
|
| - ":external_config",
|
| - ":internal_config_base",
|
| - ]
|
| -}
|
| + deps = [
|
| + ":fuzzer_support",
|
| + ":wasm_module_runner",
|
| + ":wasm_test_signatures",
|
| + ]
|
|
|
| -v8_fuzzer("wasm_call_fuzzer") {
|
| -}
|
| + configs = [
|
| + ":external_config",
|
| + ":internal_config_base",
|
| + ]
|
| + }
|
|
|
| -v8_source_set("lib_wasm_section_fuzzer") {
|
| - sources = [
|
| - "test/fuzzer/wasm-section-fuzzers.cc",
|
| - "test/fuzzer/wasm-section-fuzzers.h",
|
| - ]
|
| + v8_fuzzer("wasm_code_fuzzer") {
|
| + }
|
|
|
| - configs = [
|
| - ":external_config",
|
| - ":internal_config_base",
|
| - ]
|
| -}
|
| + v8_source_set("wasm_call_fuzzer") {
|
| + sources = [
|
| + "test/fuzzer/wasm-call.cc",
|
| + ]
|
|
|
| -v8_source_set("wasm_types_section_fuzzer") {
|
| - sources = [
|
| - "test/fuzzer/wasm-types-section.cc",
|
| - ]
|
| + deps = [
|
| + ":fuzzer_support",
|
| + ":wasm_module_runner",
|
| + ":wasm_test_signatures",
|
| + ]
|
|
|
| - deps = [
|
| - ":fuzzer_support",
|
| - ":lib_wasm_section_fuzzer",
|
| - ":wasm_module_runner",
|
| - ]
|
| + configs = [
|
| + ":external_config",
|
| + ":internal_config_base",
|
| + ]
|
| + }
|
|
|
| - configs = [
|
| - ":external_config",
|
| - ":internal_config_base",
|
| - ]
|
| -}
|
| + v8_fuzzer("wasm_call_fuzzer") {
|
| + }
|
|
|
| -v8_fuzzer("wasm_types_section_fuzzer") {
|
| -}
|
| + v8_source_set("lib_wasm_section_fuzzer") {
|
| + sources = [
|
| + "test/fuzzer/wasm-section-fuzzers.cc",
|
| + "test/fuzzer/wasm-section-fuzzers.h",
|
| + ]
|
|
|
| -v8_source_set("wasm_names_section_fuzzer") {
|
| - sources = [
|
| - "test/fuzzer/wasm-names-section.cc",
|
| - ]
|
| + configs = [
|
| + ":external_config",
|
| + ":internal_config_base",
|
| + ]
|
| + }
|
|
|
| - deps = [
|
| - ":fuzzer_support",
|
| - ":lib_wasm_section_fuzzer",
|
| - ":wasm_module_runner",
|
| - ]
|
| + v8_source_set("wasm_types_section_fuzzer") {
|
| + sources = [
|
| + "test/fuzzer/wasm-types-section.cc",
|
| + ]
|
|
|
| - configs = [
|
| - ":external_config",
|
| - ":internal_config_base",
|
| - ]
|
| -}
|
| + deps = [
|
| + ":fuzzer_support",
|
| + ":lib_wasm_section_fuzzer",
|
| + ":wasm_module_runner",
|
| + ]
|
|
|
| -v8_fuzzer("wasm_names_section_fuzzer") {
|
| -}
|
| + configs = [
|
| + ":external_config",
|
| + ":internal_config_base",
|
| + ]
|
| + }
|
|
|
| -v8_source_set("wasm_globals_section_fuzzer") {
|
| - sources = [
|
| - "test/fuzzer/wasm-globals-section.cc",
|
| - ]
|
| + v8_fuzzer("wasm_types_section_fuzzer") {
|
| + }
|
|
|
| - deps = [
|
| - ":fuzzer_support",
|
| - ":lib_wasm_section_fuzzer",
|
| - ":wasm_module_runner",
|
| - ]
|
| + v8_source_set("wasm_names_section_fuzzer") {
|
| + sources = [
|
| + "test/fuzzer/wasm-names-section.cc",
|
| + ]
|
|
|
| - configs = [
|
| - ":external_config",
|
| - ":internal_config_base",
|
| - ]
|
| -}
|
| + deps = [
|
| + ":fuzzer_support",
|
| + ":lib_wasm_section_fuzzer",
|
| + ":wasm_module_runner",
|
| + ]
|
|
|
| -v8_fuzzer("wasm_globals_section_fuzzer") {
|
| -}
|
| + configs = [
|
| + ":external_config",
|
| + ":internal_config_base",
|
| + ]
|
| + }
|
|
|
| -v8_source_set("wasm_imports_section_fuzzer") {
|
| - sources = [
|
| - "test/fuzzer/wasm-imports-section.cc",
|
| - ]
|
| + v8_fuzzer("wasm_names_section_fuzzer") {
|
| + }
|
|
|
| - deps = [
|
| - ":fuzzer_support",
|
| - ":lib_wasm_section_fuzzer",
|
| - ":wasm_module_runner",
|
| - ]
|
| + v8_source_set("wasm_globals_section_fuzzer") {
|
| + sources = [
|
| + "test/fuzzer/wasm-globals-section.cc",
|
| + ]
|
|
|
| - configs = [
|
| - ":external_config",
|
| - ":internal_config_base",
|
| - ]
|
| -}
|
| + deps = [
|
| + ":fuzzer_support",
|
| + ":lib_wasm_section_fuzzer",
|
| + ":wasm_module_runner",
|
| + ]
|
|
|
| -v8_fuzzer("wasm_imports_section_fuzzer") {
|
| -}
|
| + configs = [
|
| + ":external_config",
|
| + ":internal_config_base",
|
| + ]
|
| + }
|
|
|
| -v8_source_set("wasm_function_sigs_section_fuzzer") {
|
| - sources = [
|
| - "test/fuzzer/wasm-function-sigs-section.cc",
|
| - ]
|
| + v8_fuzzer("wasm_globals_section_fuzzer") {
|
| + }
|
|
|
| - deps = [
|
| - ":fuzzer_support",
|
| - ":lib_wasm_section_fuzzer",
|
| - ":wasm_module_runner",
|
| - ]
|
| + v8_source_set("wasm_imports_section_fuzzer") {
|
| + sources = [
|
| + "test/fuzzer/wasm-imports-section.cc",
|
| + ]
|
|
|
| - configs = [
|
| - ":external_config",
|
| - ":internal_config_base",
|
| - ]
|
| -}
|
| + deps = [
|
| + ":fuzzer_support",
|
| + ":lib_wasm_section_fuzzer",
|
| + ":wasm_module_runner",
|
| + ]
|
|
|
| -v8_fuzzer("wasm_function_sigs_section_fuzzer") {
|
| -}
|
| + configs = [
|
| + ":external_config",
|
| + ":internal_config_base",
|
| + ]
|
| + }
|
|
|
| -v8_source_set("wasm_memory_section_fuzzer") {
|
| - sources = [
|
| - "test/fuzzer/wasm-memory-section.cc",
|
| - ]
|
| + v8_fuzzer("wasm_imports_section_fuzzer") {
|
| + }
|
|
|
| - deps = [
|
| - ":fuzzer_support",
|
| - ":lib_wasm_section_fuzzer",
|
| - ":wasm_module_runner",
|
| - ]
|
| + v8_source_set("wasm_function_sigs_section_fuzzer") {
|
| + sources = [
|
| + "test/fuzzer/wasm-function-sigs-section.cc",
|
| + ]
|
|
|
| - configs = [
|
| - ":external_config",
|
| - ":internal_config_base",
|
| - ]
|
| -}
|
| + deps = [
|
| + ":fuzzer_support",
|
| + ":lib_wasm_section_fuzzer",
|
| + ":wasm_module_runner",
|
| + ]
|
|
|
| -v8_fuzzer("wasm_memory_section_fuzzer") {
|
| -}
|
| + configs = [
|
| + ":external_config",
|
| + ":internal_config_base",
|
| + ]
|
| + }
|
|
|
| -v8_source_set("wasm_data_section_fuzzer") {
|
| - sources = [
|
| - "test/fuzzer/wasm-data-section.cc",
|
| - ]
|
| + v8_fuzzer("wasm_function_sigs_section_fuzzer") {
|
| + }
|
|
|
| - deps = [
|
| - ":fuzzer_support",
|
| - ":lib_wasm_section_fuzzer",
|
| - ":wasm_module_runner",
|
| - ]
|
| + v8_source_set("wasm_memory_section_fuzzer") {
|
| + sources = [
|
| + "test/fuzzer/wasm-memory-section.cc",
|
| + ]
|
|
|
| - configs = [
|
| - ":external_config",
|
| - ":internal_config_base",
|
| - ]
|
| -}
|
| + deps = [
|
| + ":fuzzer_support",
|
| + ":lib_wasm_section_fuzzer",
|
| + ":wasm_module_runner",
|
| + ]
|
|
|
| -v8_fuzzer("wasm_data_section_fuzzer") {
|
| + configs = [
|
| + ":external_config",
|
| + ":internal_config_base",
|
| + ]
|
| + }
|
| +
|
| + v8_fuzzer("wasm_memory_section_fuzzer") {
|
| + }
|
| +
|
| + v8_source_set("wasm_data_section_fuzzer") {
|
| + sources = [
|
| + "test/fuzzer/wasm-data-section.cc",
|
| + ]
|
| +
|
| + deps = [
|
| + ":fuzzer_support",
|
| + ":lib_wasm_section_fuzzer",
|
| + ":wasm_module_runner",
|
| + ]
|
| +
|
| + configs = [
|
| + ":external_config",
|
| + ":internal_config_base",
|
| + ]
|
| + }
|
| +
|
| + v8_fuzzer("wasm_data_section_fuzzer") {
|
| + }
|
| }
|
|
|