@@ -62,7 +62,7 @@ declare_args() {
6262 # Allows the embedder to add a custom suffix to the version string.
6363 v8_embedder_string = " "
6464
65- # Sets -dENABLE_DISASSEMBLER .
65+ # Sets -DENABLE_DISASSEMBLER .
6666 v8_enable_disassembler = " "
6767
6868 # Sets the number of internal fields on promise objects.
@@ -74,19 +74,19 @@ declare_args() {
7474 # Sets the number of internal fields on array buffer view objects.
7575 v8_array_buffer_view_internal_field_count = 0
7676
77- # Sets -dENABLE_GDB_JIT_INTERFACE .
77+ # Sets -DENABLE_GDB_JIT_INTERFACE .
7878 v8_enable_gdbjit = " "
7979
80- # Sets -dENABLE_VTUNE_JIT_INTERFACE .
80+ # Sets -DENABLE_VTUNE_JIT_INTERFACE .
8181 v8_enable_vtunejit = false
8282
83- # Sets -dENABLE_VTUNE_TRACEMARK .
83+ # Sets -DENABLE_VTUNE_TRACEMARK .
8484 v8_enable_vtunetracemark = false
8585
86- # Sets -dENABLE_HUGEPAGE
86+ # Sets -DENABLE_HUGEPAGE
8787 v8_enable_hugepage = false
8888
89- # Sets -dV8_ENABLE_PRIVATE_MAPPING_FORK_OPTIMIZATION .
89+ # Sets -DV8_ENABLE_PRIVATE_MAPPING_FORK_OPTIMIZATION .
9090 #
9191 # This flag speeds up the performance of fork/execve on Linux systems for
9292 # embedders which use it (like Node.js). It works by marking the pages that
@@ -97,7 +97,7 @@ declare_args() {
9797 # See v8:7381 for more details.
9898 v8_enable_private_mapping_fork_optimization = false
9999
100- # Sets -dENABLE_HANDLE_ZAPPING .
100+ # Sets -DENABLE_HANDLE_ZAPPING .
101101 v8_enable_handle_zapping = is_asan || is_debug
102102
103103 # Enable slow dchecks.
@@ -118,16 +118,16 @@ declare_args() {
118118
119119 # Allow runtime-enabled code comments (with --code-comments). Enabled by
120120 # default in debug builds.
121- # Sets -dV8_CODE_COMMENTS
121+ # Sets -DV8_CODE_COMMENTS
122122 v8_code_comments = " "
123123
124124 # Allow runtime-enabled debug code (with --debug-code). Enabled by default in
125125 # debug builds.
126- # Sets -dV8_ENABLE_DEBUG_CODE
126+ # Sets -DV8_ENABLE_DEBUG_CODE
127127 v8_enable_debug_code = " "
128128
129129 # Enable native counters from the snapshot (impacts performance, sets
130- # -dV8_SNAPSHOT_NATIVE_CODE_COUNTERS ).
130+ # -DV8_SNAPSHOT_NATIVE_CODE_COUNTERS ).
131131 # This option will generate extra code in the snapshot to increment counters,
132132 # as per the --native-code-counters flag.
133133 v8_enable_snapshot_native_code_counters = " "
@@ -142,32 +142,32 @@ declare_args() {
142142 # Enable code-generation-time checking of types in the CodeStubAssembler.
143143 v8_enable_verify_csa = false
144144
145- # Sets -dOBJECT_PRINT .
145+ # Sets -DOBJECT_PRINT .
146146 v8_enable_object_print = " "
147147
148- # Sets -dV8_TRACE_MAPS .
148+ # Sets -DV8_TRACE_MAPS .
149149 v8_enable_trace_maps = " "
150150
151- # Sets -dV8_ENABLE_CHECKS .
151+ # Sets -DV8_ENABLE_CHECKS .
152152 v8_enable_v8_checks = " "
153153
154- # Sets -dV8_TRACE_UNOPTIMIZED .
154+ # Sets -DV8_TRACE_UNOPTIMIZED .
155155 v8_enable_trace_unoptimized = " "
156156 v8_enable_trace_ignition = false
157157 v8_enable_trace_baseline_exec = false
158158
159- # Sets -dV8_TRACE_FEEDBACK_UPDATES .
159+ # Sets -DV8_TRACE_FEEDBACK_UPDATES .
160160 v8_enable_trace_feedback_updates = false
161161
162- # Sets -dV8_ATOMIC_OBJECT_FIELD_WRITES and turns all field write operations
162+ # Sets -DV8_ATOMIC_OBJECT_FIELD_WRITES and turns all field write operations
163163 # into relaxed atomic operations.
164164 v8_enable_atomic_object_field_writes = " "
165165
166166 # Controls the default value of v8_enable_concurrent_marking_state. See the
167167 # default setting code below.
168168 v8_enable_concurrent_marking = true
169169
170- # Sets -dV8_IGNITION_DISPATCH_COUNTING .
170+ # Sets -DV8_IGNITION_DISPATCH_COUNTING .
171171 # Enables counting frequencies of bytecode dispatches. After building in this
172172 # configuration, subsequent runs of d8 can output frequencies for each pair
173173 # of (current, next) bytecode instructions executed if you specify
@@ -219,12 +219,12 @@ declare_args() {
219219 v8_enable_test_features = " "
220220
221221 # Enable short builtins call instruction sequences by un-embedding builtins.
222- # Sets -dV8_SHORT_BUILTIN_CALLS
222+ # Sets -DV8_SHORT_BUILTIN_CALLS
223223 v8_enable_short_builtin_calls = " "
224224
225225 # Enable support for external code range relative to the pointer compression
226226 # cage.
227- # Sets -dV8_EXTERNAL_CODE_SPACE
227+ # Sets -DV8_EXTERNAL_CODE_SPACE
228228 v8_enable_external_code_space = " "
229229
230230 # With post mortem support enabled, metadata is embedded into libv8 that
@@ -354,7 +354,7 @@ declare_args() {
354354 # Sets -DV8_DICT_PROPERTY_CONST_TRACKING
355355 v8_dict_property_const_tracking = false
356356
357- # Enable map packing & unpacking (sets -dV8_MAP_PACKING ).
357+ # Enable map packing & unpacking (sets -DV8_MAP_PACKING ).
358358 v8_enable_map_packing = false
359359
360360 # Allow for JS promise hooks (instead of just C++).
@@ -365,7 +365,7 @@ declare_args() {
365365 # The flag enables disabling the feature, to test this data's overhead.
366366 v8_enable_continuation_preserved_embedder_data = true
367367
368- # Enable allocation folding globally (sets -dV8_ALLOCATION_FOLDING ).
368+ # Enable allocation folding globally (sets -DV8_ALLOCATION_FOLDING ).
369369 # When it's disabled, the --turbo-allocation-folding runtime flag will be ignored.
370370 v8_enable_allocation_folding = true
371371
@@ -451,6 +451,10 @@ declare_args() {
451451 # isn't present, which some embedders rely on. This option controls
452452 # the explicit dependency and allows the build to complete.
453453 v8_depend_on_icu_data_file = icu_use_data_file
454+
455+ # Some fuzzers depend on fuzzing functionality linked into the v8 library.
456+ # For binary size reasons this functionality is not always available.
457+ v8_wasm_random_fuzzers = " "
454458}
455459
456460# Derived defaults.
@@ -750,6 +754,14 @@ if (v8_expose_public_symbols == "") {
750754 v8_expose_public_symbols = v8_expose_symbols
751755}
752756
757+ # Some fuzzers depend on fuzzing functionality linked into the v8 library.
758+ # For binary size reasons this functionality is not available for official
759+ # builds, therefore these fuzzers do not function there and should be skipped
760+ # instead.
761+ if (v8_wasm_random_fuzzers == " " ) {
762+ v8_wasm_random_fuzzers = ! is_official_build
763+ }
764+
753765v8_random_seed = " 314159265"
754766v8_toolset_for_shell = " host"
755767
@@ -1335,6 +1347,9 @@ config("features") {
13351347 if (v8_disable_leaptiering ) {
13361348 defines += [ " V8_DISABLE_LEAPTIERING" ]
13371349 }
1350+ if (v8_wasm_random_fuzzers ) {
1351+ defines += [ " V8_WASM_RANDOM_FUZZERS" ]
1352+ }
13381353}
13391354
13401355config (" toolchain" ) {
@@ -2830,6 +2845,7 @@ action("v8_dump_build_config") {
28302845 " verify_csa=$v8_enable_verify_csa " ,
28312846 " verify_heap=$v8_enable_verify_heap " ,
28322847 " verify_predictable=$v8_enable_verify_predictable " ,
2848+ " wasm_random_fuzzers=$v8_wasm_random_fuzzers " ,
28332849 " memory_corruption_api=$v8_enable_memory_corruption_api " ,
28342850 " leaptiering=$use_leaptiering " ,
28352851
@@ -5939,7 +5955,7 @@ v8_source_set("v8_base_without_compiler") {
59395955 " src/wasm/well-known-imports.cc" ,
59405956 " src/wasm/wrappers.cc" ,
59415957 ]
5942- if (! is_official_build ) {
5958+ if (v8_wasm_random_fuzzers ) {
59435959 sources += [
59445960 # ## gcmole(all) ###
59455961 " src/wasm/fuzzing/random-module-generation.cc" ,
@@ -7565,7 +7581,7 @@ group("v8_fuzzers") {
75657581 ]
75667582
75677583 if (v8_enable_webassembly ) {
7568- if (! is_official_build ) {
7584+ if (v8_wasm_random_fuzzers ) {
75697585 data_deps += [
75707586 " :v8_simple_wasm_compile_all_fuzzer" ,
75717587 " :v8_simple_wasm_compile_fuzzer" ,
@@ -7984,11 +8000,7 @@ if (v8_enable_webassembly) {
79848000 sources = [ " test/fuzzer/wasm-streaming.cc" ]
79858001 }
79868002
7987- # Some fuzzers depend on fuzzing functionality linked into the v8 library.
7988- # For binary size reasons this functionality is not available for official
7989- # builds, therefore these fuzzers do not function there and should be skipped
7990- # instead.
7991- if (! is_official_build ) {
8003+ if (v8_wasm_random_fuzzers ) {
79928004 v8_wasm_fuzzer (" wasm_compile_all_fuzzer" ) {
79938005 sources = [
79948006 " test/common/wasm/test-signatures.h" ,
@@ -8024,7 +8036,7 @@ if (v8_enable_webassembly) {
80248036 v8_wasm_fuzzer (" wasm_deopt_fuzzer" ) {
80258037 sources = [ " test/fuzzer/wasm-deopt.cc" ]
80268038 }
8027- } # !is_official_build
8039+ } # v8_wasm_random_fuzzers
80288040}
80298041
80308042v8_fuzzer (" inspector_fuzzer" ) {
0 commit comments