Index: BUILD.gn |
diff --git a/BUILD.gn b/BUILD.gn |
index fa67b29a75d88c772b294b4ca918ff250adabade..32ad56fdb0b57fa3640f2969d5aff7a0ed960c03 100644 |
--- a/BUILD.gn |
+++ b/BUILD.gn |
@@ -46,6 +46,15 @@ if (is_msan) { |
v8_target_arch = target_cpu |
} |
+if (v8_use_snapshot && v8_use_external_startup_data) { |
+ snapshot_target = ":v8_external_snapshot" |
+} else if (v8_use_snapshot) { |
+ snapshot_target = ":v8_snapshot" |
+} else { |
+ assert(!v8_use_external_startup_data) |
+ snapshot_target = ":v8_nosnapshot" |
+} |
+ |
############################################################################### |
# Configurations |
# |
@@ -1788,6 +1797,28 @@ source_set("v8_libplatform") { |
] |
} |
+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", |
+ ] |
+ |
+ configs -= [ "//build/config/compiler:chromium_code" ] |
+ configs += [ "//build/config/compiler:no_chromium_code" ] |
+ configs += [ |
+ ":internal_config_base", |
+ ":features", |
+ ":toolchain", |
+ ] |
+ |
+ deps = [ |
+ ":v8_libplatform", |
+ snapshot_target, |
+ ] |
+} |
+ |
############################################################################### |
# Executables |
# |
@@ -1821,15 +1852,6 @@ if (current_toolchain == snapshot_toolchain) { |
# Public targets |
# |
-if (v8_use_snapshot && v8_use_external_startup_data) { |
- snapshot_target = ":v8_external_snapshot" |
-} else if (v8_use_snapshot) { |
- snapshot_target = ":v8_snapshot" |
-} else { |
- assert(!v8_use_external_startup_data) |
- snapshot_target = ":v8_nosnapshot" |
-} |
- |
if (is_component_build) { |
component("v8") { |
sources = [ |
@@ -1911,3 +1933,21 @@ if ((current_toolchain == host_toolchain && v8_toolset_for_d8 == "host") || |
} |
} |
} |
+ |
+source_set("parser_fuzzer") { |
+ sources = [ |
+ "test/fuzzer/parser.cc", |
+ ] |
+ |
+ deps = [ |
+ ":fuzzer_support", |
+ ] |
+ |
+ configs -= [ "//build/config/compiler:chromium_code" ] |
+ configs += [ "//build/config/compiler:no_chromium_code" ] |
+ configs += [ |
+ ":internal_config", |
+ ":features", |
+ ":toolchain", |
+ ] |
+} |