Upload upstream chromium 73.0.3683.0
[platform/framework/web/chromium-efl.git] / v8 / BUILD.gn
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import("//build/config/android/config.gni")
6 import("//build/config/arm.gni")
7 import("//build/config/dcheck_always_on.gni")
8 import("//build/config/host_byteorder.gni")
9 import("//build/config/jumbo.gni")
10 import("//build/config/mips.gni")
11 import("//build/config/sanitizers/sanitizers.gni")
12 import("//build_overrides/build.gni")
13
14 if (is_android) {
15   import("//build/config/android/rules.gni")
16 }
17
18 import("gni/v8.gni")
19 import("snapshot_toolchain.gni")
20
21 # Specifies if the target build is a simulator build. Comparing target cpu
22 # with v8 target cpu to not affect simulator builds for making cross-compile
23 # snapshots.
24 is_target_simulator = (target_cpu != v8_target_cpu && !v8_multi_arch_build) ||
25                       (current_cpu != v8_current_cpu && v8_multi_arch_build)
26
27 # For faster Windows builds. See https://crbug.com/v8/8475.
28 emit_builtins_as_inline_asm = is_win && is_clang
29
30 declare_args() {
31   # Print to stdout on Android.
32   v8_android_log_stdout = false
33
34   # Dynamically set an additional dependency from v8/custom_deps.
35   v8_custom_deps = ""
36
37   # Turns on all V8 debug features. Enables running V8 in a pseudo debug mode
38   # within a release Chrome.
39   v8_enable_debugging_features = is_debug
40
41   # Sets -DV8_ENABLE_FUTURE.
42   v8_enable_future = false
43
44   # Lite mode disables a number of performance optimizations to reduce memory
45   # at the cost of performance.
46   # Sets --DV8_LITE_MODE.
47   v8_enable_lite_mode = false
48
49   # Sets -DVERIFY_HEAP.
50   v8_enable_verify_heap = ""
51
52   # Sets -DVERIFY_PREDICTABLE
53   v8_enable_verify_predictable = false
54
55   # Enable compiler warnings when using V8_DEPRECATED apis.
56   v8_deprecation_warnings = true
57
58   # Enable compiler warnings when using V8_DEPRECATE_SOON apis.
59   v8_imminent_deprecation_warnings = true
60
61   # Embeds the given script into the snapshot.
62   v8_embed_script = ""
63
64   # Allows the embedder to add a custom suffix to the version string.
65   v8_embedder_string = ""
66
67   # Sets -dENABLE_DISASSEMBLER.
68   v8_enable_disassembler = ""
69
70   # Sets the number of internal fields on promise objects.
71   v8_promise_internal_field_count = 0
72
73   # Sets -dENABLE_GDB_JIT_INTERFACE.
74   v8_enable_gdbjit = ""
75
76   # Sets -dENABLE_VTUNE_JIT_INTERFACE.
77   v8_enable_vtunejit = false
78
79   # Sets -dENABLE_HANDLE_ZAPPING.
80   v8_enable_handle_zapping = true
81
82   # Enable slow dchecks.
83   v8_enable_slow_dchecks = false
84
85   # Enable fast mksnapshot runs.
86   v8_enable_fast_mksnapshot = false
87
88   # Enable embedded builtins.
89   v8_enable_embedded_builtins = true
90
91   # Enable code comments for builtins in the snapshot (impacts performance).
92   v8_enable_snapshot_code_comments = false
93
94   # Enable code-generation-time checking of types in the CodeStubAssembler.
95   v8_enable_verify_csa = false
96
97   # Enable pointer compression (sets -dV8_COMPRESS_POINTERS).
98   v8_enable_pointer_compression = false
99   v8_enable_31bit_smis_on_64bit_arch = false
100
101   # Interpreted regexp engine exists as platform-independent alternative
102   # based where the regular expression is compiled to a bytecode.
103   v8_interpreted_regexp = false
104
105   # Sets -dOBJECT_PRINT.
106   v8_enable_object_print = ""
107
108   # Sets -dV8_TRACE_MAPS.
109   v8_enable_trace_maps = ""
110
111   # Sets -dV8_ENABLE_CHECKS.
112   v8_enable_v8_checks = ""
113
114   # Sets -dV8_TRACE_IGNITION.
115   v8_enable_trace_ignition = false
116
117   # Sets -dV8_TRACE_FEEDBACK_UPDATES.
118   v8_enable_trace_feedback_updates = false
119
120   # Sets -dV8_CONCURRENT_MARKING
121   v8_enable_concurrent_marking = true
122
123   # Enables various testing features.
124   v8_enable_test_features = ""
125
126   # With post mortem support enabled, metadata is embedded into libv8 that
127   # describes various parameters of the VM for use by debuggers. See
128   # tools/gen-postmortem-metadata.py for details.
129   v8_postmortem_support = false
130
131   # Use Siphash as added protection against hash flooding attacks.
132   v8_use_siphash = false
133
134   # Switches off inlining in V8.
135   v8_no_inline = false
136
137   # Override OS page size when generating snapshot
138   v8_os_page_size = "0"
139
140   # Similar to vfp but on MIPS.
141   v8_can_use_fpu_instructions = true
142
143   # Similar to the ARM hard float ABI but on MIPS.
144   v8_use_mips_abi_hardfloat = true
145
146   # Controls the threshold for on-heap/off-heap Typed Arrays.
147   v8_typed_array_max_size_in_heap = 64
148
149   # List of extra files to snapshot. They will be snapshotted in order so
150   # if files export symbols used by later files, they should go first.
151   #
152   # This default is used by cctests. Projects using V8 will want to override.
153   v8_extra_library_files = [ "//test/cctest/test-extra.js" ]
154
155   v8_enable_gdbjit =
156       ((v8_current_cpu == "x86" || v8_current_cpu == "x64") &&
157        (is_linux || is_mac)) || (v8_current_cpu == "ppc64" && is_linux)
158
159   # Temporary flag to allow embedders to update their microtasks scopes
160   # while rolling in a new version of V8.
161   v8_check_microtasks_scopes_consistency = ""
162
163   # Enable mitigations for executing untrusted code.
164   # Disabled by default on ia32 due to conflicting requirements with embedded
165   # builtins. Enabled by default on Android since it doesn't support
166   # site-isolation in Chrome and on simulator builds which test code generation
167   # on these platforms.
168   v8_untrusted_code_mitigations =
169       v8_current_cpu != "x86" && (is_android || is_target_simulator)
170
171   # Enable minor mark compact.
172   v8_enable_minor_mc = true
173
174   # Check that each header can be included in isolation (requires also
175   # setting the "check_v8_header_includes" gclient variable to run a
176   # specific hook).
177   v8_check_header_includes = false
178
179   # We reuse the snapshot toolchain for building torque and other generators to
180   # avoid building v8_libbase on the host more than once. On mips with big
181   # endian, the snapshot toolchain is the target toolchain and, hence, can't be
182   # used.
183 }
184
185 v8_generator_toolchain = v8_snapshot_toolchain
186 if (host_cpu == "x64" &&
187     (v8_current_cpu == "mips" || v8_current_cpu == "mips64")) {
188   v8_generator_toolchain = "//build/toolchain/linux:clang_x64"
189 }
190
191 # Derived defaults.
192 if (v8_enable_verify_heap == "") {
193   v8_enable_verify_heap = v8_enable_debugging_features
194 }
195 if (v8_enable_object_print == "") {
196   v8_enable_object_print = v8_enable_debugging_features
197 }
198 if (v8_enable_disassembler == "") {
199   v8_enable_disassembler = v8_enable_debugging_features
200 }
201 if (v8_enable_trace_maps == "") {
202   v8_enable_trace_maps = v8_enable_debugging_features
203 }
204 if (v8_enable_test_features == "") {
205   v8_enable_test_features = v8_enable_debugging_features || dcheck_always_on
206 }
207 if (v8_enable_v8_checks == "") {
208   v8_enable_v8_checks = v8_enable_debugging_features
209 }
210 if (v8_check_microtasks_scopes_consistency == "") {
211   v8_check_microtasks_scopes_consistency =
212       v8_enable_debugging_features || dcheck_always_on
213 }
214
215 assert(v8_current_cpu != "x86" || !v8_untrusted_code_mitigations,
216        "Untrusted code mitigations are unsupported on ia32")
217
218 assert(!v8_enable_lite_mode || v8_enable_embedded_builtins,
219        "Lite mode requires embedded builtins")
220 assert(!v8_enable_lite_mode || v8_use_snapshot,
221        "Lite mode requires a snapshot build")
222
223 v8_random_seed = "314159265"
224 v8_toolset_for_shell = "host"
225
226 ###############################################################################
227 # Configurations
228 #
229 config("internal_config") {
230   visibility = [ ":*" ]  # Only targets in this file can depend on this.
231
232   include_dirs = [
233     ".",
234     "$target_gen_dir",
235   ]
236
237   configs = [ "//build/config/compiler:wexit_time_destructors" ]
238
239   if (is_component_build) {
240     defines = [ "BUILDING_V8_SHARED" ]
241   }
242 }
243
244 config("internal_config_base") {
245   visibility = [ ":*" ]  # Only targets in this file can depend on this.
246
247   include_dirs = [
248     ".",
249     "$target_gen_dir",
250   ]
251 }
252
253 # This config should be applied to code using the libplatform.
254 config("libplatform_config") {
255   include_dirs = [ "include" ]
256   if (is_component_build) {
257     defines = [ "USING_V8_PLATFORM_SHARED" ]
258   }
259 }
260
261 # This config should be applied to code using the libbase.
262 config("libbase_config") {
263   if (is_component_build) {
264     defines = [ "USING_V8_BASE_SHARED" ]
265   }
266   libs = []
267   if (is_android && current_toolchain != host_toolchain) {
268     libs += [ "log" ]
269   }
270 }
271
272 # This config should be applied to code using the libsampler.
273 config("libsampler_config") {
274   include_dirs = [ "include" ]
275 }
276
277 # This config should only be applied to code using V8 and not any V8 code
278 # itself.
279 config("external_config") {
280   defines = []
281   if (is_component_build) {
282     defines += [ "USING_V8_SHARED" ]
283   }
284   if (v8_enable_v8_checks) {
285     defines += [ "V8_ENABLE_CHECKS" ]  # Used in "include/v8.h".
286   }
287   if (v8_deprecation_warnings) {
288     defines += [ "V8_DEPRECATION_WARNINGS" ]
289   }
290   if (v8_imminent_deprecation_warnings) {
291     defines += [ "V8_IMMINENT_DEPRECATION_WARNINGS" ]
292   }
293   include_dirs = [
294     "include",
295     "$target_gen_dir/include",
296   ]
297 }
298
299 # This config should only be applied to code that needs to be explicitly
300 # aware of whether we are using startup data or not.
301 config("external_startup_data") {
302   if (v8_use_external_startup_data) {
303     defines = [ "V8_USE_EXTERNAL_STARTUP_DATA" ]
304   }
305 }
306
307 config("features") {
308   visibility = [ ":*" ]  # Only targets in this file can depend on this.
309
310   defines = []
311
312   if (v8_embedder_string != "") {
313     defines += [ "V8_EMBEDDER_STRING=\"$v8_embedder_string\"" ]
314   }
315   if (v8_enable_disassembler) {
316     defines += [ "ENABLE_DISASSEMBLER" ]
317   }
318   if (v8_promise_internal_field_count != 0) {
319     defines +=
320         [ "V8_PROMISE_INTERNAL_FIELD_COUNT=${v8_promise_internal_field_count}" ]
321   }
322   defines +=
323       [ "V8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=${v8_typed_array_max_size_in_heap}" ]
324   if (v8_enable_future) {
325     defines += [ "V8_ENABLE_FUTURE" ]
326   }
327   if (v8_enable_lite_mode) {
328     defines += [ "V8_LITE_MODE" ]
329
330     # TODO(v8:7777): Remove the define once the --jitless runtime flag does
331     # everything we need.
332     defines += [ "V8_JITLESS_MODE" ]
333   }
334   if (v8_enable_gdbjit) {
335     defines += [ "ENABLE_GDB_JIT_INTERFACE" ]
336   }
337   if (v8_enable_vtunejit) {
338     defines += [ "ENABLE_VTUNE_JIT_INTERFACE" ]
339   }
340   if (v8_enable_minor_mc) {
341     defines += [ "ENABLE_MINOR_MC" ]
342   }
343   if (v8_enable_pointer_compression) {
344     defines += [ "V8_COMPRESS_POINTERS" ]
345   }
346   if (v8_enable_31bit_smis_on_64bit_arch) {
347     defines += [ "V8_31BIT_SMIS_ON_64BIT_ARCH" ]
348   }
349   if (v8_enable_object_print) {
350     defines += [ "OBJECT_PRINT" ]
351   }
352   if (v8_enable_verify_heap) {
353     defines += [ "VERIFY_HEAP" ]
354   }
355   if (v8_enable_verify_predictable) {
356     defines += [ "VERIFY_PREDICTABLE" ]
357   }
358   if (v8_enable_trace_maps) {
359     defines += [ "V8_TRACE_MAPS" ]
360   }
361   if (v8_enable_trace_ignition) {
362     defines += [ "V8_TRACE_IGNITION" ]
363   }
364   if (v8_enable_trace_feedback_updates) {
365     defines += [ "V8_TRACE_FEEDBACK_UPDATES" ]
366   }
367   if (v8_enable_test_features) {
368     defines += [ "V8_ENABLE_ALLOCATION_TIMEOUT" ]
369     defines += [ "V8_ENABLE_FORCE_SLOW_PATH" ]
370   }
371   if (v8_enable_v8_checks) {
372     defines += [ "V8_ENABLE_CHECKS" ]
373   }
374   if (v8_interpreted_regexp || v8_enable_lite_mode) {
375     defines += [ "V8_INTERPRETED_REGEXP" ]
376   }
377   if (v8_deprecation_warnings) {
378     defines += [ "V8_DEPRECATION_WARNINGS" ]
379   }
380   if (v8_imminent_deprecation_warnings) {
381     defines += [ "V8_IMMINENT_DEPRECATION_WARNINGS" ]
382   }
383   if (v8_enable_i18n_support) {
384     defines += [ "V8_INTL_SUPPORT" ]
385   }
386   if (v8_enable_handle_zapping) {
387     defines += [ "ENABLE_HANDLE_ZAPPING" ]
388   }
389   if (v8_use_snapshot) {
390     defines += [ "V8_USE_SNAPSHOT" ]
391   }
392   if (v8_use_external_startup_data) {
393     defines += [ "V8_USE_EXTERNAL_STARTUP_DATA" ]
394   }
395   if (v8_enable_concurrent_marking) {
396     defines += [ "V8_CONCURRENT_MARKING" ]
397   }
398   if (v8_check_microtasks_scopes_consistency) {
399     defines += [ "V8_CHECK_MICROTASKS_SCOPES_CONSISTENCY" ]
400   }
401   if (v8_enable_embedded_builtins) {
402     defines += [ "V8_EMBEDDED_BUILTINS" ]
403   }
404   if (v8_use_multi_snapshots) {
405     defines += [ "V8_MULTI_SNAPSHOTS" ]
406   }
407   if (v8_use_siphash) {
408     defines += [ "V8_USE_SIPHASH" ]
409   }
410 }
411
412 config("toolchain") {
413   visibility = [ ":*" ]  # Only targets in this file can depend on this.
414
415   defines = []
416   cflags = []
417   ldflags = []
418
419   if (v8_current_cpu == "arm") {
420     defines += [ "V8_TARGET_ARCH_ARM" ]
421     if (arm_version >= 7) {
422       defines += [ "CAN_USE_ARMV7_INSTRUCTIONS" ]
423     }
424     if (arm_fpu == "vfpv3-d16") {
425       defines += [ "CAN_USE_VFP3_INSTRUCTIONS" ]
426     } else if (arm_fpu == "vfpv3") {
427       defines += [
428         "CAN_USE_VFP3_INSTRUCTIONS",
429         "CAN_USE_VFP32DREGS",
430       ]
431     } else if (arm_fpu == "neon") {
432       defines += [
433         "CAN_USE_VFP3_INSTRUCTIONS",
434         "CAN_USE_VFP32DREGS",
435         "CAN_USE_NEON",
436       ]
437     }
438
439     # TODO(jochen): Add support for arm_test_noprobe.
440
441     if (current_cpu != "arm") {
442       # These defines ares used for the ARM simulator.
443       if (arm_float_abi == "hard") {
444         defines += [ "USE_EABI_HARDFLOAT=1" ]
445       } else if (arm_float_abi == "softfp") {
446         defines += [ "USE_EABI_HARDFLOAT=0" ]
447       }
448     }
449   }
450   if (v8_current_cpu == "arm64") {
451     defines += [ "V8_TARGET_ARCH_ARM64" ]
452   }
453
454   # Mips64el/mipsel simulators.
455   if (is_target_simulator &&
456       (v8_current_cpu == "mipsel" || v8_current_cpu == "mips64el")) {
457     defines += [ "_MIPS_TARGET_SIMULATOR" ]
458   }
459
460   if (v8_current_cpu == "mipsel" || v8_current_cpu == "mips") {
461     defines += [ "V8_TARGET_ARCH_MIPS" ]
462     if (v8_can_use_fpu_instructions) {
463       defines += [ "CAN_USE_FPU_INSTRUCTIONS" ]
464     }
465     if (v8_use_mips_abi_hardfloat) {
466       defines += [
467         "__mips_hard_float=1",
468         "CAN_USE_FPU_INSTRUCTIONS",
469       ]
470     } else {
471       defines += [ "__mips_soft_float=1" ]
472     }
473     if (mips_arch_variant == "r6") {
474       defines += [
475         "_MIPS_ARCH_MIPS32R6",
476         "FPU_MODE_FP64",
477       ]
478       if (mips_use_msa) {
479         defines += [ "_MIPS_MSA" ]
480       }
481     } else if (mips_arch_variant == "r2") {
482       defines += [ "_MIPS_ARCH_MIPS32R2" ]
483       if (mips_fpu_mode == "fp64") {
484         defines += [ "FPU_MODE_FP64" ]
485       } else if (mips_fpu_mode == "fpxx") {
486         defines += [ "FPU_MODE_FPXX" ]
487       } else if (mips_fpu_mode == "fp32") {
488         defines += [ "FPU_MODE_FP32" ]
489       }
490     } else if (mips_arch_variant == "r1") {
491       defines += [ "FPU_MODE_FP32" ]
492     }
493
494     # TODO(jochen): Add support for mips_arch_variant rx and loongson.
495   }
496
497   if (v8_current_cpu == "mips64el" || v8_current_cpu == "mips64") {
498     defines += [ "V8_TARGET_ARCH_MIPS64" ]
499     if (v8_can_use_fpu_instructions) {
500       defines += [ "CAN_USE_FPU_INSTRUCTIONS" ]
501     }
502
503     if (host_byteorder == "little") {
504       defines += [ "V8_TARGET_ARCH_MIPS64_LE" ]
505     } else if (host_byteorder == "big") {
506       defines += [ "V8_TARGET_ARCH_MIPS64_BE" ]
507     }
508     if (v8_use_mips_abi_hardfloat) {
509       defines += [
510         "__mips_hard_float=1",
511         "CAN_USE_FPU_INSTRUCTIONS",
512       ]
513     } else {
514       defines += [ "__mips_soft_float=1" ]
515     }
516     if (mips_arch_variant == "r6") {
517       defines += [ "_MIPS_ARCH_MIPS64R6" ]
518       if (mips_use_msa) {
519         defines += [ "_MIPS_MSA" ]
520       }
521     } else if (mips_arch_variant == "r2") {
522       defines += [ "_MIPS_ARCH_MIPS64R2" ]
523     }
524   }
525   if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") {
526     defines += [ "V8_TARGET_ARCH_S390" ]
527     if (v8_current_cpu == "s390x") {
528       defines += [ "V8_TARGET_ARCH_S390X" ]
529     }
530     if (host_byteorder == "little") {
531       defines += [ "V8_TARGET_ARCH_S390_LE_SIM" ]
532     } else {
533       cflags += [ "-march=z196" ]
534     }
535   }
536   if (v8_current_cpu == "ppc" || v8_current_cpu == "ppc64") {
537     defines += [ "V8_TARGET_ARCH_PPC" ]
538     if (v8_current_cpu == "ppc64") {
539       defines += [ "V8_TARGET_ARCH_PPC64" ]
540     }
541     if (host_byteorder == "little") {
542       defines += [ "V8_TARGET_ARCH_PPC_LE" ]
543     } else if (host_byteorder == "big") {
544       defines += [ "V8_TARGET_ARCH_PPC_BE" ]
545       if (current_os == "aix") {
546         cflags += [
547           # Work around AIX ceil, trunc and round oddities.
548           "-mcpu=power5+",
549           "-mfprnd",
550
551           # Work around AIX assembler popcntb bug.
552           "-mno-popcntb",
553         ]
554       }
555     }
556   }
557
558   if (v8_current_cpu == "x86") {
559     defines += [ "V8_TARGET_ARCH_IA32" ]
560     if (is_win) {
561       # Ensure no surprising artifacts from 80bit double math with x86.
562       cflags += [ "/arch:SSE2" ]
563     }
564   }
565   if (v8_current_cpu == "x64") {
566     defines += [ "V8_TARGET_ARCH_X64" ]
567     if (is_win) {
568       # Increase the initial stack size. The default is 1MB, this is 2MB. This
569       # applies only to executables and shared libraries produced by V8 since
570       # ldflags are not pushed to dependants.
571       ldflags += [ "/STACK:2097152" ]
572     }
573   }
574   if (is_android && v8_android_log_stdout) {
575     defines += [ "V8_ANDROID_LOG_STDOUT" ]
576   }
577
578   # TODO(jochen): Support v8_enable_prof on Windows.
579   # TODO(jochen): Add support for compiling with simulators.
580
581   if (v8_enable_debugging_features) {
582     if (is_linux && v8_enable_backtrace) {
583       ldflags += [ "-rdynamic" ]
584     }
585
586     defines += [ "DEBUG" ]
587     if (v8_enable_slow_dchecks) {
588       defines += [ "ENABLE_SLOW_DCHECKS" ]
589     }
590   } else if (dcheck_always_on) {
591     defines += [ "DEBUG" ]
592   }
593
594   if (v8_enable_verify_csa) {
595     defines += [ "ENABLE_VERIFY_CSA" ]
596   }
597
598   if (!v8_untrusted_code_mitigations) {
599     defines += [ "DISABLE_UNTRUSTED_CODE_MITIGATIONS" ]
600   }
601
602   if (v8_no_inline) {
603     cflags += [
604       "-fno-inline-functions",
605       "-fno-inline",
606     ]
607   }
608
609   if (is_clang) {
610     cflags += [
611       "-Wmissing-field-initializers",
612
613       # TODO(hans): Remove once http://crbug.com/428099 is resolved.
614       "-Winconsistent-missing-override",
615     ]
616
617     if (v8_current_cpu != "mips" && v8_current_cpu != "mipsel") {
618       # We exclude MIPS because the IsMipsArchVariant macro causes trouble.
619       cflags += [ "-Wunreachable-code" ]
620     }
621
622     if (v8_current_cpu == "x64" || v8_current_cpu == "arm64" ||
623         v8_current_cpu == "mips64el") {
624       cflags += [ "-Wshorten-64-to-32" ]
625     }
626   }
627
628   if (is_win) {
629     cflags += [
630       "/wd4245",  # Conversion with signed/unsigned mismatch.
631       "/wd4267",  # Conversion with possible loss of data.
632       "/wd4324",  # Padding structure due to alignment.
633       "/wd4701",  # Potentially uninitialized local variable.
634       "/wd4702",  # Unreachable code.
635       "/wd4703",  # Potentially uninitialized local pointer variable.
636       "/wd4709",  # Comma operator within array index expr (bugged).
637       "/wd4714",  # Function marked forceinline not inlined.
638
639       # MSVC assumes that control can get past an exhaustive switch and then
640       # warns if there's no return there (see https://crbug.com/v8/7658)
641       "/wd4715",  # Not all control paths return a value.
642
643       "/wd4718",  # Recursive call has no side-effect.
644       "/wd4723",  # https://crbug.com/v8/7771
645       "/wd4724",  # https://crbug.com/v8/7771
646       "/wd4800",  # Forcing value to bool.
647     ]
648   }
649
650   if (!is_clang && !is_win) {
651     cflags += [
652       # Disable gcc warnings for optimizations based on the assumption that
653       # signed overflow does not occur. Generates false positives (see
654       # http://crbug.com/v8/6341).
655       "-Wno-strict-overflow",
656
657       # GCC assumes that control can get past an exhaustive switch and then
658       # warns if there's no return there (see https://crbug.com/v8/7658).
659       "-Wno-return-type",
660     ]
661   }
662 }
663
664 # Configs for code coverage with gcov. Separate configs for cflags and ldflags
665 # to selectively influde cflags in non-test targets only.
666 config("v8_gcov_coverage_cflags") {
667   cflags = [
668     "-fprofile-arcs",
669     "-ftest-coverage",
670   ]
671 }
672
673 config("v8_gcov_coverage_ldflags") {
674   ldflags = [ "-fprofile-arcs" ]
675 }
676
677 ###############################################################################
678 # Actions
679 #
680
681 # Only for Windows clang builds. Converts the embedded.S file produced by
682 # mksnapshot into an embedded.cc file with corresponding inline assembly.
683 template("asm_to_inline_asm") {
684   name = target_name
685   if (name == "default") {
686     suffix = ""
687   } else {
688     suffix = "_$name"
689   }
690
691   action("asm_to_inline_asm_" + name) {
692     visibility = [ ":*" ]  # Only targets in this file can depend on this.
693
694     assert(emit_builtins_as_inline_asm)
695
696     script = "tools/snapshot/asm_to_inline_asm.py"
697     deps = [
698       ":run_mksnapshot_" + name,
699     ]
700     sources = [
701       "$target_gen_dir/embedded${suffix}.S",
702     ]
703     outputs = [
704       "$target_gen_dir/embedded${suffix}.cc",
705     ]
706     args = invoker.args
707     args += [
708       rebase_path("$target_gen_dir/embedded${suffix}.S", root_build_dir),
709       rebase_path("$target_gen_dir/embedded${suffix}.cc", root_build_dir),
710     ]
711   }
712 }
713
714 action("js2c_extras") {
715   visibility = [ ":*" ]  # Only targets in this file can depend on this.
716
717   script = "tools/js2c.py"
718
719   sources = v8_extra_library_files
720
721   outputs = [
722     "$target_gen_dir/extras-libraries.cc",
723   ]
724
725   args = [
726            rebase_path("$target_gen_dir/extras-libraries.cc", root_build_dir),
727            "EXTRAS",
728          ] + rebase_path(sources, root_build_dir)
729
730   if (v8_use_external_startup_data) {
731     outputs += [ "$target_gen_dir/libraries_extras.bin" ]
732     args += [
733       "--startup_blob",
734       rebase_path("$target_gen_dir/libraries_extras.bin", root_build_dir),
735     ]
736   }
737 }
738
739 if (is_android && enable_java_templates) {
740   android_assets("v8_external_startup_data_assets") {
741     if (v8_use_external_startup_data) {
742       # We don't support side-by-side snapshots on Android within Chromium.
743       assert(!v8_use_multi_snapshots)
744       deps = [
745         "//v8",
746       ]
747       sources = [
748         "$root_out_dir/natives_blob.bin",
749       ]
750       renaming_sources = [ "$root_out_dir/snapshot_blob.bin" ]
751       if (current_cpu == "arm" || current_cpu == "x86" ||
752           current_cpu == "mipsel") {
753         renaming_destinations = [ "snapshot_blob_32.bin" ]
754       } else {
755         renaming_destinations = [ "snapshot_blob_64.bin" ]
756       }
757       disable_compression = true
758     }
759   }
760 }
761
762 if (v8_use_external_startup_data) {
763   action("natives_blob") {
764     visibility = [ ":*" ]  # Only targets in this file can depend on this.
765
766     deps = [
767       ":js2c_extras",
768     ]
769
770     # NOSORT
771     sources = [
772       "$target_gen_dir/libraries_extras.bin",
773     ]
774
775     outputs = [
776       "$root_out_dir/natives_blob.bin",
777     ]
778
779     data = [
780       "$root_out_dir/natives_blob.bin",
781     ]
782
783     script = "tools/concatenate-files.py"
784
785     args = rebase_path(sources + outputs, root_build_dir)
786   }
787 }
788
789 action("postmortem-metadata") {
790   # Only targets in this file and the top-level visibility target can
791   # depend on this.
792   visibility = [
793     ":*",
794     "//:gn_visibility",
795   ]
796
797   script = "tools/gen-postmortem-metadata.py"
798
799   # NOSORT
800   sources = [
801     "src/objects.h",
802     "src/objects-inl.h",
803     "src/objects/allocation-site-inl.h",
804     "src/objects/allocation-site.h",
805     "src/objects/cell-inl.h",
806     "src/objects/cell.h",
807     "src/objects/code-inl.h",
808     "src/objects/code.h",
809     "src/objects/data-handler.h",
810     "src/objects/data-handler-inl.h",
811     "src/objects/feedback-cell.h",
812     "src/objects/feedback-cell-inl.h",
813     "src/objects/fixed-array-inl.h",
814     "src/objects/fixed-array.h",
815     "src/objects/heap-number-inl.h",
816     "src/objects/heap-number.h",
817     "src/objects/heap-object-inl.h",
818     "src/objects/heap-object.h",
819     "src/objects/instance-type.h",
820     "src/objects/js-array-inl.h",
821     "src/objects/js-array.h",
822     "src/objects/js-array-buffer-inl.h",
823     "src/objects/js-array-buffer.h",
824     "src/objects/js-objects-inl.h",
825     "src/objects/js-objects.h",
826     "src/objects/js-promise-inl.h",
827     "src/objects/js-promise.h",
828     "src/objects/js-regexp-inl.h",
829     "src/objects/js-regexp.h",
830     "src/objects/js-regexp-string-iterator-inl.h",
831     "src/objects/js-regexp-string-iterator.h",
832     "src/objects/map.h",
833     "src/objects/map-inl.h",
834     "src/objects/name.h",
835     "src/objects/name-inl.h",
836     "src/objects/oddball-inl.h",
837     "src/objects/oddball.h",
838     "src/objects/scope-info.h",
839     "src/objects/script.h",
840     "src/objects/script-inl.h",
841     "src/objects/shared-function-info.h",
842     "src/objects/shared-function-info-inl.h",
843     "src/objects/string.h",
844     "src/objects/string-inl.h",
845     "src/objects/struct.h",
846     "src/objects/struct-inl.h",
847   ]
848
849   outputs = [
850     "$target_gen_dir/debug-support.cc",
851   ]
852
853   args = rebase_path(outputs, root_build_dir) +
854          rebase_path(sources, root_build_dir)
855 }
856
857 torque_files = [
858   "src/builtins/base.tq",
859   "src/builtins/frames.tq",
860   "src/builtins/arguments.tq",
861   "src/builtins/array.tq",
862   "src/builtins/array-copywithin.tq",
863   "src/builtins/array-filter.tq",
864   "src/builtins/array-foreach.tq",
865   "src/builtins/array-join.tq",
866   "src/builtins/array-lastindexof.tq",
867   "src/builtins/array-of.tq",
868   "src/builtins/array-reverse.tq",
869   "src/builtins/array-slice.tq",
870   "src/builtins/array-splice.tq",
871   "src/builtins/array-unshift.tq",
872   "src/builtins/collections.tq",
873   "src/builtins/data-view.tq",
874   "src/builtins/extras-utils.tq",
875   "src/builtins/object.tq",
876   "src/builtins/object-fromentries.tq",
877   "src/builtins/iterator.tq",
878   "src/builtins/typed-array.tq",
879   "src/builtins/typed-array-createtypedarray.tq",
880   "test/torque/test-torque.tq",
881   "third_party/v8/builtins/array-sort.tq",
882 ]
883
884 torque_namespaces = [
885   "base",
886   "arguments",
887   "array",
888   "collections",
889   "iterator",
890   "object",
891   "typed-array",
892   "data-view",
893   "extras-utils",
894   "test",
895 ]
896
897 action("run_torque") {
898   visibility = [
899     ":*",
900     "tools/gcmole/:*",
901     "test/cctest/:*",
902   ]
903
904   deps = [
905     ":torque($v8_generator_toolchain)",
906   ]
907
908   script = "tools/run.py"
909
910   sources = torque_files
911
912   outputs = [
913     "$target_gen_dir/torque-generated/builtin-definitions-from-dsl.h",
914   ]
915   foreach(namespace, torque_namespaces) {
916     outputs += [
917       "$target_gen_dir/torque-generated/builtins-$namespace-from-dsl-gen.cc",
918       "$target_gen_dir/torque-generated/builtins-$namespace-from-dsl-gen.h",
919     ]
920   }
921
922   args = [
923     "./" + rebase_path(get_label_info(":torque($v8_generator_toolchain)",
924                                       "root_out_dir") + "/torque",
925                        root_build_dir),
926     "-o",
927     rebase_path("$target_gen_dir/torque-generated", root_build_dir),
928   ]
929
930   foreach(file, torque_files) {
931     args += [ rebase_path(file, root_build_dir) ]
932   }
933 }
934
935 v8_source_set("torque_generated_initializers") {
936   visibility = [ ":*" ]  # Only targets in this file can depend on this.
937
938   deps = [
939     ":generate_bytecode_builtins_list",
940     ":run_torque",
941   ]
942
943   if (v8_enable_i18n_support) {
944     public_deps = [
945       "//third_party/icu",
946     ]
947   }
948
949   sources = []
950   foreach(namespace, torque_namespaces) {
951     sources += [
952       "$target_gen_dir/torque-generated/builtins-$namespace-from-dsl-gen.cc",
953       "$target_gen_dir/torque-generated/builtins-$namespace-from-dsl-gen.h",
954     ]
955   }
956
957   configs = [ ":internal_config" ]
958 }
959
960 action("generate_bytecode_builtins_list") {
961   script = "tools/run.py"
962   outputs = [
963     "$target_gen_dir/builtins-generated/bytecodes-builtins-list.h",
964   ]
965   deps = [
966     ":bytecode_builtins_list_generator($v8_generator_toolchain)",
967   ]
968   args = [
969     "./" + rebase_path(
970             get_label_info(
971                     ":bytecode_builtins_list_generator($v8_generator_toolchain)",
972                     "root_out_dir") + "/bytecode_builtins_list_generator",
973             root_build_dir),
974     rebase_path("$target_gen_dir/builtins-generated/bytecodes-builtins-list.h",
975                 root_build_dir),
976   ]
977 }
978
979 # Template to generate different V8 snapshots based on different runtime flags.
980 # Can be invoked with run_mksnapshot(<name>). The target will resolve to
981 # run_mksnapshot_<name>. If <name> is "default", no file suffixes will be used.
982 # Otherwise files are suffixed, e.g. embedded_<name>.S and
983 # snapshot_blob_<name>.bin.
984 #
985 # The template exposes the variables:
986 #   args: additional flags for mksnapshots
987 #   embedded_suffix: a camel case suffix for method names in the embedded
988 #       snapshot.
989 template("run_mksnapshot") {
990   name = target_name
991   if (name == "default") {
992     suffix = ""
993   } else {
994     suffix = "_$name"
995   }
996   action("run_mksnapshot_" + name) {
997     visibility = [ ":*" ]  # Only targets in this file can depend on this.
998
999     deps = [
1000       ":mksnapshot($v8_snapshot_toolchain)",
1001     ]
1002
1003     script = "tools/run.py"
1004
1005     sources = []
1006
1007     outputs = []
1008
1009     data = []
1010
1011     args = [
1012       "./" + rebase_path(get_label_info(":mksnapshot($v8_snapshot_toolchain)",
1013                                         "root_out_dir") + "/mksnapshot",
1014                          root_build_dir),
1015       "--turbo_instruction_scheduling",
1016     ]
1017
1018     args += invoker.args
1019
1020     if (v8_enable_embedded_builtins) {
1021       outputs += [ "$target_gen_dir/embedded${suffix}.S" ]
1022       args += [
1023         "--embedded_src",
1024         rebase_path("$target_gen_dir/embedded${suffix}.S", root_build_dir),
1025       ]
1026       if (invoker.embedded_variant != "") {
1027         args += [
1028           "--embedded_variant",
1029           invoker.embedded_variant,
1030         ]
1031       }
1032     }
1033
1034     if (v8_random_seed != "0") {
1035       args += [
1036         "--random-seed",
1037         v8_random_seed,
1038       ]
1039     }
1040
1041     if (v8_os_page_size != "0") {
1042       args += [
1043         "--v8_os_page_size",
1044         v8_os_page_size,
1045       ]
1046     }
1047
1048     if (v8_use_external_startup_data) {
1049       outputs += [ "$root_out_dir/snapshot_blob${suffix}.bin" ]
1050       data += [ "$root_out_dir/snapshot_blob${suffix}.bin" ]
1051       args += [
1052         "--startup_blob",
1053         rebase_path("$root_out_dir/snapshot_blob${suffix}.bin", root_build_dir),
1054       ]
1055     } else {
1056       outputs += [ "$target_gen_dir/snapshot${suffix}.cc" ]
1057       args += [
1058         "--startup_src",
1059         rebase_path("$target_gen_dir/snapshot${suffix}.cc", root_build_dir),
1060       ]
1061     }
1062
1063     if (v8_embed_script != "") {
1064       sources += [ v8_embed_script ]
1065       args += [ rebase_path(v8_embed_script, root_build_dir) ]
1066     }
1067
1068     if (v8_enable_snapshot_code_comments) {
1069       args += [ "--code-comments" ]
1070     }
1071
1072     if (v8_enable_fast_mksnapshot) {
1073       args += [
1074         "--no-turbo-rewrite-far-jumps",
1075         "--no-turbo-verify-allocation",
1076       ]
1077
1078       if (v8_enable_debugging_features && v8_enable_slow_dchecks) {
1079         # mksnapshot only accepts this flag if ENABLE_SLOW_DCHECKS is defined.
1080         args += [ "--no-enable-slow-asserts" ]
1081       }
1082     }
1083   }
1084 }
1085
1086 if (v8_use_snapshot) {
1087   run_mksnapshot("default") {
1088     args = []
1089     if (v8_enable_embedded_builtins) {
1090       embedded_variant = "Default"
1091     }
1092   }
1093   if (emit_builtins_as_inline_asm) {
1094     asm_to_inline_asm("default") {
1095       args = []
1096     }
1097   }
1098   if (v8_use_multi_snapshots) {
1099     run_mksnapshot("trusted") {
1100       args = [ "--no-untrusted-code-mitigations" ]
1101       if (v8_enable_embedded_builtins) {
1102         embedded_variant = "Trusted"
1103       }
1104     }
1105     if (emit_builtins_as_inline_asm) {
1106       asm_to_inline_asm("trusted") {
1107         args = []
1108       }
1109     }
1110   }
1111 }
1112
1113 action("v8_dump_build_config") {
1114   script = "tools/testrunner/utils/dump_build_config.py"
1115   outputs = [
1116     "$root_out_dir/v8_build_config.json",
1117   ]
1118   is_gcov_coverage = v8_code_coverage && !is_clang
1119   args = [
1120     rebase_path("$root_out_dir/v8_build_config.json", root_build_dir),
1121     "current_cpu=\"$current_cpu\"",
1122     "dcheck_always_on=$dcheck_always_on",
1123     "is_android=$is_android",
1124     "is_asan=$is_asan",
1125     "is_cfi=$is_cfi",
1126     "is_component_build=$is_component_build",
1127     "is_debug=$v8_enable_debugging_features",
1128     "is_gcov_coverage=$is_gcov_coverage",
1129     "is_msan=$is_msan",
1130     "is_tsan=$is_tsan",
1131     "is_ubsan_vptr=$is_ubsan_vptr",
1132     "target_cpu=\"$target_cpu\"",
1133     "v8_current_cpu=\"$v8_current_cpu\"",
1134     "v8_enable_i18n_support=$v8_enable_i18n_support",
1135     "v8_enable_verify_predictable=$v8_enable_verify_predictable",
1136     "v8_target_cpu=\"$v8_target_cpu\"",
1137     "v8_use_snapshot=$v8_use_snapshot",
1138     "v8_enable_embedded_builtins=$v8_enable_embedded_builtins",
1139     "v8_enable_verify_csa=$v8_enable_verify_csa",
1140     "v8_enable_lite_mode=$v8_enable_lite_mode",
1141     "v8_enable_pointer_compression=$v8_enable_pointer_compression",
1142   ]
1143
1144   if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel" ||
1145       v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") {
1146     args += [
1147       "mips_arch_variant=\"$mips_arch_variant\"",
1148       "mips_use_msa=$mips_use_msa",
1149     ]
1150   }
1151 }
1152
1153 ###############################################################################
1154 # Source Sets (aka static libraries)
1155 #
1156
1157 source_set("v8_maybe_snapshot") {
1158   if (v8_use_snapshot && v8_use_external_startup_data) {
1159     public_deps = [
1160       ":v8_external_snapshot",
1161     ]
1162   } else if (v8_use_snapshot) {
1163     public_deps = [
1164       ":v8_snapshot",
1165     ]
1166   } else {
1167     # Ignore v8_use_external_startup_data setting if no snapshot is used.
1168     public_deps = [
1169       ":v8_init",
1170       ":v8_nosnapshot",
1171     ]
1172   }
1173 }
1174
1175 v8_source_set("v8_nosnapshot") {
1176   visibility = [ ":*" ]  # Only targets in this file can depend on this.
1177
1178   deps = [
1179     ":js2c_extras",
1180     ":v8_base",
1181   ]
1182
1183   sources = [
1184     "$target_gen_dir/extras-libraries.cc",
1185     "src/snapshot/embedded-empty.cc",
1186     "src/snapshot/snapshot-empty.cc",
1187   ]
1188
1189   configs = [ ":internal_config" ]
1190 }
1191
1192 if (v8_use_snapshot && !v8_use_external_startup_data) {
1193   v8_source_set("v8_snapshot") {
1194     # Only targets in this file and the top-level visibility target can
1195     # depend on this.
1196     visibility = [
1197       ":*",
1198       "//:gn_visibility",
1199     ]
1200
1201     deps = [
1202       ":js2c_extras",
1203       ":v8_base",
1204     ]
1205     public_deps = [
1206       # This should be public so downstream targets can declare the snapshot
1207       # output file as their inputs.
1208       ":run_mksnapshot_default",
1209     ]
1210
1211     # Do not publicize any header to remove build dependency.
1212     public = []
1213
1214     sources = [
1215       "$target_gen_dir/extras-libraries.cc",
1216       "$target_gen_dir/snapshot.cc",
1217       "src/setup-isolate-deserialize.cc",
1218     ]
1219
1220     if (v8_enable_embedded_builtins && emit_builtins_as_inline_asm) {
1221       deps += [ ":asm_to_inline_asm_default" ]
1222       sources += [ "$target_gen_dir/embedded.cc" ]
1223     } else if (v8_enable_embedded_builtins) {
1224       sources += [ "$target_gen_dir/embedded.S" ]
1225     } else {
1226       sources += [ "src/snapshot/embedded-empty.cc" ]
1227     }
1228
1229     configs = [ ":internal_config" ]
1230   }
1231 }
1232
1233 if (v8_use_snapshot && v8_use_external_startup_data) {
1234   v8_source_set("v8_external_snapshot") {
1235     visibility = [ ":*" ]  # Only targets in this file can depend on this.
1236
1237     deps = [
1238       ":js2c_extras",
1239       ":v8_base",
1240     ]
1241     public_deps = [
1242       ":natives_blob",
1243       ":run_mksnapshot_default",
1244     ]
1245
1246     if (v8_use_multi_snapshots) {
1247       public_deps += [ ":run_mksnapshot_trusted" ]
1248     }
1249
1250     sources = [
1251       "src/setup-isolate-deserialize.cc",
1252       "src/snapshot/natives-external.cc",
1253       "src/snapshot/snapshot-external.cc",
1254     ]
1255
1256     # Do not publicize any header to remove build dependency.
1257     public = []
1258
1259     if (v8_enable_embedded_builtins && emit_builtins_as_inline_asm) {
1260       deps += [ ":asm_to_inline_asm_default" ]
1261       sources += [ "$target_gen_dir/embedded.cc" ]
1262
1263       if (v8_use_multi_snapshots) {
1264         deps += [ ":asm_to_inline_asm_trusted" ]
1265         sources += [ "$target_gen_dir/embedded_trusted.cc" ]
1266
1267         if (use_jumbo_build == true) {
1268           jumbo_excluded_sources = [ "$target_gen_dir/embedded_trusted.cc" ]
1269         }
1270       }
1271     } else if (v8_enable_embedded_builtins) {
1272       sources += [ "$target_gen_dir/embedded.S" ]
1273
1274       if (v8_use_multi_snapshots) {
1275         sources += [ "$target_gen_dir/embedded_trusted.S" ]
1276
1277         if (use_jumbo_build == true) {
1278           jumbo_excluded_sources = [
1279             # Duplicated symbols with embedded.S
1280             "$target_gen_dir/embedded_trusted.S",
1281           ]
1282         }
1283       }
1284     } else {
1285       sources += [ "src/snapshot/embedded-empty.cc" ]
1286     }
1287
1288     configs = [ ":internal_config" ]
1289   }
1290 }
1291
1292 v8_source_set("v8_initializers") {
1293   visibility = [
1294     ":*",
1295     "test/cctest:*",
1296   ]
1297
1298   deps = [
1299     ":torque_generated_initializers",
1300     ":v8_base",
1301   ]
1302
1303   sources = [
1304     ### gcmole(all) ###
1305     "src/builtins/builtins-arguments-gen.cc",
1306     "src/builtins/builtins-arguments-gen.h",
1307     "src/builtins/builtins-array-gen.cc",
1308     "src/builtins/builtins-array-gen.h",
1309     "src/builtins/builtins-async-function-gen.cc",
1310     "src/builtins/builtins-async-gen.cc",
1311     "src/builtins/builtins-async-gen.h",
1312     "src/builtins/builtins-async-generator-gen.cc",
1313     "src/builtins/builtins-async-iterator-gen.cc",
1314     "src/builtins/builtins-bigint-gen.cc",
1315     "src/builtins/builtins-boolean-gen.cc",
1316     "src/builtins/builtins-call-gen.cc",
1317     "src/builtins/builtins-call-gen.h",
1318     "src/builtins/builtins-collections-gen.cc",
1319     "src/builtins/builtins-console-gen.cc",
1320     "src/builtins/builtins-constructor-gen.cc",
1321     "src/builtins/builtins-constructor-gen.h",
1322     "src/builtins/builtins-constructor.h",
1323     "src/builtins/builtins-conversion-gen.cc",
1324     "src/builtins/builtins-data-view-gen.h",
1325     "src/builtins/builtins-date-gen.cc",
1326     "src/builtins/builtins-debug-gen.cc",
1327     "src/builtins/builtins-function-gen.cc",
1328     "src/builtins/builtins-generator-gen.cc",
1329     "src/builtins/builtins-global-gen.cc",
1330     "src/builtins/builtins-handler-gen.cc",
1331     "src/builtins/builtins-ic-gen.cc",
1332     "src/builtins/builtins-internal-gen.cc",
1333     "src/builtins/builtins-interpreter-gen.cc",
1334     "src/builtins/builtins-intl-gen.cc",
1335     "src/builtins/builtins-iterator-gen.cc",
1336     "src/builtins/builtins-iterator-gen.h",
1337     "src/builtins/builtins-lazy-gen.cc",
1338     "src/builtins/builtins-lazy-gen.h",
1339     "src/builtins/builtins-math-gen.cc",
1340     "src/builtins/builtins-math-gen.h",
1341     "src/builtins/builtins-microtask-queue-gen.cc",
1342     "src/builtins/builtins-number-gen.cc",
1343     "src/builtins/builtins-object-gen.cc",
1344     "src/builtins/builtins-promise-gen.cc",
1345     "src/builtins/builtins-promise-gen.h",
1346     "src/builtins/builtins-proxy-gen.cc",
1347     "src/builtins/builtins-proxy-gen.h",
1348     "src/builtins/builtins-reflect-gen.cc",
1349     "src/builtins/builtins-regexp-gen.cc",
1350     "src/builtins/builtins-regexp-gen.h",
1351     "src/builtins/builtins-sharedarraybuffer-gen.cc",
1352     "src/builtins/builtins-string-gen.cc",
1353     "src/builtins/builtins-string-gen.h",
1354     "src/builtins/builtins-symbol-gen.cc",
1355     "src/builtins/builtins-typed-array-gen.cc",
1356     "src/builtins/builtins-typed-array-gen.h",
1357     "src/builtins/builtins-utils-gen.h",
1358     "src/builtins/builtins-wasm-gen.cc",
1359     "src/builtins/growable-fixed-array-gen.cc",
1360     "src/builtins/growable-fixed-array-gen.h",
1361     "src/builtins/setup-builtins-internal.cc",
1362     "src/code-stub-assembler.cc",
1363     "src/code-stub-assembler.h",
1364     "src/heap/setup-heap-internal.cc",
1365     "src/ic/accessor-assembler.cc",
1366     "src/ic/accessor-assembler.h",
1367     "src/ic/binary-op-assembler.cc",
1368     "src/ic/binary-op-assembler.h",
1369     "src/ic/keyed-store-generic.cc",
1370     "src/ic/keyed-store-generic.h",
1371     "src/interpreter/interpreter-assembler.cc",
1372     "src/interpreter/interpreter-assembler.h",
1373     "src/interpreter/interpreter-generator.cc",
1374     "src/interpreter/interpreter-generator.h",
1375     "src/interpreter/interpreter-intrinsics-generator.cc",
1376     "src/interpreter/interpreter-intrinsics-generator.h",
1377   ]
1378
1379   if (use_jumbo_build == true) {
1380     jumbo_excluded_sources = [
1381       # TODO(mostynb@vewd.com): don't exclude these http://crbug.com/752428
1382       "src/builtins/builtins-async-iterator-gen.cc",
1383       "src/builtins/builtins-async-generator-gen.cc",
1384
1385       # These source files take an unusually large amount of time to
1386       # compile.  Build them separately to avoid bottlenecks.
1387       "src/builtins/builtins-regexp-gen.cc",
1388       "src/code-stub-assembler.cc",
1389     ]
1390   }
1391
1392   if (v8_current_cpu == "x86") {
1393     sources += [
1394       ### gcmole(arch:ia32) ###
1395       "src/builtins/ia32/builtins-ia32.cc",
1396     ]
1397   } else if (v8_current_cpu == "x64") {
1398     sources += [
1399       ### gcmole(arch:x64) ###
1400       "src/builtins/x64/builtins-x64.cc",
1401     ]
1402   } else if (v8_current_cpu == "arm") {
1403     sources += [
1404       ### gcmole(arch:arm) ###
1405       "src/builtins/arm/builtins-arm.cc",
1406     ]
1407   } else if (v8_current_cpu == "arm64") {
1408     sources += [
1409       ### gcmole(arch:arm64) ###
1410       "src/builtins/arm64/builtins-arm64.cc",
1411     ]
1412   } else if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel") {
1413     sources += [
1414       ### gcmole(arch:mipsel) ###
1415       "src/builtins/mips/builtins-mips.cc",
1416     ]
1417   } else if (v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") {
1418     sources += [
1419       ### gcmole(arch:mips64el) ###
1420       "src/builtins/mips64/builtins-mips64.cc",
1421     ]
1422   } else if (v8_current_cpu == "ppc" || v8_current_cpu == "ppc64") {
1423     sources += [
1424       ### gcmole(arch:ppc) ###
1425       "src/builtins/ppc/builtins-ppc.cc",
1426     ]
1427   } else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") {
1428     sources += [
1429       ### gcmole(arch:s390) ###
1430       "src/builtins/s390/builtins-s390.cc",
1431     ]
1432   }
1433
1434   if (!v8_enable_i18n_support) {
1435     sources -= [ "src/builtins/builtins-intl-gen.cc" ]
1436   }
1437
1438   configs = [ ":internal_config" ]
1439 }
1440
1441 v8_source_set("v8_init") {
1442   visibility = [ ":*" ]  # Only targets in this file can depend on this.
1443
1444   deps = [
1445     ":v8_initializers",
1446   ]
1447
1448   sources = [
1449     ### gcmole(all) ###
1450     "src/setup-isolate-full.cc",
1451   ]
1452   if (v8_enable_i18n_support) {
1453     public_deps = [
1454       "//third_party/icu",
1455     ]
1456   }
1457
1458   configs = [ ":internal_config" ]
1459 }
1460
1461 # This is split out to be a non-code containing target that the Chromium browser
1462 # DLL can depend upon to get only a version string.
1463 v8_header_set("v8_version") {
1464   configs = [ ":internal_config" ]
1465
1466   sources = [
1467     "include/v8-value-serializer-version.h",
1468     "include/v8-version-string.h",
1469     "include/v8-version.h",
1470   ]
1471 }
1472
1473 # This is split out to be a non-code containing target that the Chromium browser
1474 # can depend upon to get basic v8 types.
1475 v8_header_set("v8_headers") {
1476   configs = [ ":internal_config" ]
1477
1478   sources = [
1479     "include/v8-internal.h",
1480     "include/v8.h",
1481     "include/v8config.h",
1482   ]
1483
1484   if (is_linux || is_mac) {
1485     sources += [ "include/v8-wasm-trap-handler-posix.h" ]
1486   }
1487
1488   if (is_win) {
1489     sources += [ "include/v8-wasm-trap-handler-win.h" ]
1490   }
1491
1492   deps = [
1493     ":v8_version",
1494   ]
1495 }
1496
1497 v8_source_set("v8_base") {
1498   visibility = [ ":*" ]  # Only targets in this file can depend on this.
1499
1500   # Split static libraries on windows into two.
1501   split_count = 2
1502
1503   sources = [
1504     "//base/trace_event/common/trace_event_common.h",
1505
1506     ### gcmole(all) ###
1507     "$target_gen_dir/builtins-generated/bytecodes-builtins-list.h",
1508     "include/v8-inspector-protocol.h",
1509     "include/v8-inspector.h",
1510     "include/v8-internal.h",
1511     "include/v8-platform.h",
1512     "include/v8-profiler.h",
1513     "include/v8-testing.h",
1514     "include/v8-util.h",
1515     "include/v8-wasm-trap-handler-posix.h",
1516     "include/v8.h",
1517     "include/v8config.h",
1518     "src/accessors.cc",
1519     "src/accessors.h",
1520     "src/address-map.cc",
1521     "src/address-map.h",
1522     "src/allocation-site-scopes-inl.h",
1523     "src/allocation-site-scopes.h",
1524     "src/allocation.cc",
1525     "src/allocation.h",
1526     "src/api-arguments-inl.h",
1527     "src/api-arguments.cc",
1528     "src/api-arguments.h",
1529     "src/api-natives.cc",
1530     "src/api-natives.h",
1531     "src/api.cc",
1532     "src/api.h",
1533     "src/arguments-inl.h",
1534     "src/arguments.cc",
1535     "src/arguments.h",
1536     "src/asan.h",
1537     "src/asmjs/asm-js.cc",
1538     "src/asmjs/asm-js.h",
1539     "src/asmjs/asm-names.h",
1540     "src/asmjs/asm-parser.cc",
1541     "src/asmjs/asm-parser.h",
1542     "src/asmjs/asm-scanner.cc",
1543     "src/asmjs/asm-scanner.h",
1544     "src/asmjs/asm-types.cc",
1545     "src/asmjs/asm-types.h",
1546     "src/assembler-arch-inl.h",
1547     "src/assembler-arch.h",
1548     "src/assembler-inl.h",
1549     "src/assembler.cc",
1550     "src/assembler.h",
1551     "src/assert-scope.cc",
1552     "src/assert-scope.h",
1553     "src/ast/ast-function-literal-id-reindexer.cc",
1554     "src/ast/ast-function-literal-id-reindexer.h",
1555     "src/ast/ast-source-ranges.h",
1556     "src/ast/ast-traversal-visitor.h",
1557     "src/ast/ast-value-factory.cc",
1558     "src/ast/ast-value-factory.h",
1559     "src/ast/ast.cc",
1560     "src/ast/ast.h",
1561     "src/ast/modules.cc",
1562     "src/ast/modules.h",
1563     "src/ast/prettyprinter.cc",
1564     "src/ast/prettyprinter.h",
1565     "src/ast/scopes.cc",
1566     "src/ast/scopes.h",
1567     "src/ast/source-range-ast-visitor.cc",
1568     "src/ast/source-range-ast-visitor.h",
1569     "src/ast/variables.cc",
1570     "src/ast/variables.h",
1571     "src/bailout-reason.cc",
1572     "src/bailout-reason.h",
1573     "src/basic-block-profiler.cc",
1574     "src/basic-block-profiler.h",
1575     "src/bignum-dtoa.cc",
1576     "src/bignum-dtoa.h",
1577     "src/bignum.cc",
1578     "src/bignum.h",
1579     "src/bit-vector.cc",
1580     "src/bit-vector.h",
1581     "src/bootstrapper.cc",
1582     "src/bootstrapper.h",
1583     "src/boxed-float.h",
1584     "src/builtins/builtins-api.cc",
1585     "src/builtins/builtins-array.cc",
1586     "src/builtins/builtins-arraybuffer.cc",
1587     "src/builtins/builtins-bigint.cc",
1588     "src/builtins/builtins-boolean.cc",
1589     "src/builtins/builtins-call.cc",
1590     "src/builtins/builtins-callsite.cc",
1591     "src/builtins/builtins-collections.cc",
1592     "src/builtins/builtins-console.cc",
1593     "src/builtins/builtins-constructor.h",
1594     "src/builtins/builtins-dataview.cc",
1595     "src/builtins/builtins-date.cc",
1596     "src/builtins/builtins-definitions.h",
1597     "src/builtins/builtins-descriptors.h",
1598     "src/builtins/builtins-error.cc",
1599     "src/builtins/builtins-extras-utils.cc",
1600     "src/builtins/builtins-function.cc",
1601     "src/builtins/builtins-global.cc",
1602     "src/builtins/builtins-internal.cc",
1603     "src/builtins/builtins-intl.cc",
1604     "src/builtins/builtins-json.cc",
1605     "src/builtins/builtins-math.cc",
1606     "src/builtins/builtins-number.cc",
1607     "src/builtins/builtins-object.cc",
1608     "src/builtins/builtins-promise.cc",
1609     "src/builtins/builtins-promise.h",
1610     "src/builtins/builtins-reflect.cc",
1611     "src/builtins/builtins-regexp.cc",
1612     "src/builtins/builtins-sharedarraybuffer.cc",
1613     "src/builtins/builtins-string.cc",
1614     "src/builtins/builtins-symbol.cc",
1615     "src/builtins/builtins-trace.cc",
1616     "src/builtins/builtins-typed-array.cc",
1617     "src/builtins/builtins-utils-inl.h",
1618     "src/builtins/builtins-utils.h",
1619     "src/builtins/builtins-weak-refs.cc",
1620     "src/builtins/builtins.cc",
1621     "src/builtins/builtins.h",
1622     "src/builtins/constants-table-builder.cc",
1623     "src/builtins/constants-table-builder.h",
1624     "src/cached-powers.cc",
1625     "src/cached-powers.h",
1626     "src/callable.h",
1627     "src/cancelable-task.cc",
1628     "src/cancelable-task.h",
1629     "src/char-predicates-inl.h",
1630     "src/char-predicates.cc",
1631     "src/char-predicates.h",
1632     "src/checks.h",
1633     "src/code-comments.cc",
1634     "src/code-comments.h",
1635     "src/code-events.h",
1636     "src/code-factory.cc",
1637     "src/code-factory.h",
1638     "src/code-reference.cc",
1639     "src/code-reference.h",
1640     "src/code-tracer.h",
1641     "src/collector.h",
1642     "src/compilation-cache.cc",
1643     "src/compilation-cache.h",
1644     "src/compilation-statistics.cc",
1645     "src/compilation-statistics.h",
1646     "src/compiler-dispatcher/compiler-dispatcher.cc",
1647     "src/compiler-dispatcher/compiler-dispatcher.h",
1648     "src/compiler-dispatcher/optimizing-compile-dispatcher.cc",
1649     "src/compiler-dispatcher/optimizing-compile-dispatcher.h",
1650     "src/compiler.cc",
1651     "src/compiler.h",
1652     "src/compiler/access-builder.cc",
1653     "src/compiler/access-builder.h",
1654     "src/compiler/access-info.cc",
1655     "src/compiler/access-info.h",
1656     "src/compiler/all-nodes.cc",
1657     "src/compiler/all-nodes.h",
1658     "src/compiler/allocation-builder-inl.h",
1659     "src/compiler/allocation-builder.h",
1660     "src/compiler/backend/code-generator-impl.h",
1661     "src/compiler/backend/code-generator.cc",
1662     "src/compiler/backend/code-generator.h",
1663     "src/compiler/backend/frame-elider.cc",
1664     "src/compiler/backend/frame-elider.h",
1665     "src/compiler/backend/gap-resolver.cc",
1666     "src/compiler/backend/gap-resolver.h",
1667     "src/compiler/backend/instruction-codes.h",
1668     "src/compiler/backend/instruction-scheduler.cc",
1669     "src/compiler/backend/instruction-scheduler.h",
1670     "src/compiler/backend/instruction-selector-impl.h",
1671     "src/compiler/backend/instruction-selector.cc",
1672     "src/compiler/backend/instruction-selector.h",
1673     "src/compiler/backend/instruction.cc",
1674     "src/compiler/backend/instruction.h",
1675     "src/compiler/backend/jump-threading.cc",
1676     "src/compiler/backend/jump-threading.h",
1677     "src/compiler/backend/live-range-separator.cc",
1678     "src/compiler/backend/live-range-separator.h",
1679     "src/compiler/backend/move-optimizer.cc",
1680     "src/compiler/backend/move-optimizer.h",
1681     "src/compiler/backend/register-allocator-verifier.cc",
1682     "src/compiler/backend/register-allocator-verifier.h",
1683     "src/compiler/backend/register-allocator.cc",
1684     "src/compiler/backend/register-allocator.h",
1685     "src/compiler/backend/unwinding-info-writer.h",
1686     "src/compiler/basic-block-instrumentor.cc",
1687     "src/compiler/basic-block-instrumentor.h",
1688     "src/compiler/branch-elimination.cc",
1689     "src/compiler/branch-elimination.h",
1690     "src/compiler/bytecode-analysis.cc",
1691     "src/compiler/bytecode-analysis.h",
1692     "src/compiler/bytecode-graph-builder.cc",
1693     "src/compiler/bytecode-graph-builder.h",
1694     "src/compiler/bytecode-liveness-map.cc",
1695     "src/compiler/bytecode-liveness-map.h",
1696     "src/compiler/c-linkage.cc",
1697     "src/compiler/checkpoint-elimination.cc",
1698     "src/compiler/checkpoint-elimination.h",
1699     "src/compiler/code-assembler.cc",
1700     "src/compiler/code-assembler.h",
1701     "src/compiler/common-node-cache.cc",
1702     "src/compiler/common-node-cache.h",
1703     "src/compiler/common-operator-reducer.cc",
1704     "src/compiler/common-operator-reducer.h",
1705     "src/compiler/common-operator.cc",
1706     "src/compiler/common-operator.h",
1707     "src/compiler/compilation-dependencies.cc",
1708     "src/compiler/compilation-dependencies.h",
1709     "src/compiler/compiler-source-position-table.cc",
1710     "src/compiler/compiler-source-position-table.h",
1711     "src/compiler/constant-folding-reducer.cc",
1712     "src/compiler/constant-folding-reducer.h",
1713     "src/compiler/control-equivalence.cc",
1714     "src/compiler/control-equivalence.h",
1715     "src/compiler/control-flow-optimizer.cc",
1716     "src/compiler/control-flow-optimizer.h",
1717     "src/compiler/dead-code-elimination.cc",
1718     "src/compiler/dead-code-elimination.h",
1719     "src/compiler/diamond.h",
1720     "src/compiler/effect-control-linearizer.cc",
1721     "src/compiler/effect-control-linearizer.h",
1722     "src/compiler/escape-analysis-reducer.cc",
1723     "src/compiler/escape-analysis-reducer.h",
1724     "src/compiler/escape-analysis.cc",
1725     "src/compiler/escape-analysis.h",
1726     "src/compiler/frame-states.cc",
1727     "src/compiler/frame-states.h",
1728     "src/compiler/frame.cc",
1729     "src/compiler/frame.h",
1730     "src/compiler/functional-list.h",
1731     "src/compiler/graph-assembler.cc",
1732     "src/compiler/graph-assembler.h",
1733     "src/compiler/graph-reducer.cc",
1734     "src/compiler/graph-reducer.h",
1735     "src/compiler/graph-trimmer.cc",
1736     "src/compiler/graph-trimmer.h",
1737     "src/compiler/graph-visualizer.cc",
1738     "src/compiler/graph-visualizer.h",
1739     "src/compiler/graph.cc",
1740     "src/compiler/graph.h",
1741     "src/compiler/int64-lowering.cc",
1742     "src/compiler/int64-lowering.h",
1743     "src/compiler/js-call-reducer.cc",
1744     "src/compiler/js-call-reducer.h",
1745     "src/compiler/js-context-specialization.cc",
1746     "src/compiler/js-context-specialization.h",
1747     "src/compiler/js-create-lowering.cc",
1748     "src/compiler/js-create-lowering.h",
1749     "src/compiler/js-generic-lowering.cc",
1750     "src/compiler/js-generic-lowering.h",
1751     "src/compiler/js-graph.cc",
1752     "src/compiler/js-graph.h",
1753     "src/compiler/js-heap-broker.cc",
1754     "src/compiler/js-heap-broker.h",
1755     "src/compiler/js-heap-copy-reducer.cc",
1756     "src/compiler/js-heap-copy-reducer.h",
1757     "src/compiler/js-inlining-heuristic.cc",
1758     "src/compiler/js-inlining-heuristic.h",
1759     "src/compiler/js-inlining.cc",
1760     "src/compiler/js-inlining.h",
1761     "src/compiler/js-intrinsic-lowering.cc",
1762     "src/compiler/js-intrinsic-lowering.h",
1763     "src/compiler/js-native-context-specialization.cc",
1764     "src/compiler/js-native-context-specialization.h",
1765     "src/compiler/js-operator.cc",
1766     "src/compiler/js-operator.h",
1767     "src/compiler/js-type-hint-lowering.cc",
1768     "src/compiler/js-type-hint-lowering.h",
1769     "src/compiler/js-typed-lowering.cc",
1770     "src/compiler/js-typed-lowering.h",
1771     "src/compiler/linkage.cc",
1772     "src/compiler/linkage.h",
1773     "src/compiler/load-elimination.cc",
1774     "src/compiler/load-elimination.h",
1775     "src/compiler/loop-analysis.cc",
1776     "src/compiler/loop-analysis.h",
1777     "src/compiler/loop-peeling.cc",
1778     "src/compiler/loop-peeling.h",
1779     "src/compiler/loop-variable-optimizer.cc",
1780     "src/compiler/loop-variable-optimizer.h",
1781     "src/compiler/machine-graph-verifier.cc",
1782     "src/compiler/machine-graph-verifier.h",
1783     "src/compiler/machine-graph.cc",
1784     "src/compiler/machine-graph.h",
1785     "src/compiler/machine-operator-reducer.cc",
1786     "src/compiler/machine-operator-reducer.h",
1787     "src/compiler/machine-operator.cc",
1788     "src/compiler/machine-operator.h",
1789     "src/compiler/memory-optimizer.cc",
1790     "src/compiler/memory-optimizer.h",
1791     "src/compiler/node-aux-data.h",
1792     "src/compiler/node-cache.cc",
1793     "src/compiler/node-cache.h",
1794     "src/compiler/node-marker.cc",
1795     "src/compiler/node-marker.h",
1796     "src/compiler/node-matchers.cc",
1797     "src/compiler/node-matchers.h",
1798     "src/compiler/node-origin-table.cc",
1799     "src/compiler/node-origin-table.h",
1800     "src/compiler/node-properties.cc",
1801     "src/compiler/node-properties.h",
1802     "src/compiler/node.cc",
1803     "src/compiler/node.h",
1804     "src/compiler/opcodes.cc",
1805     "src/compiler/opcodes.h",
1806     "src/compiler/operation-typer.cc",
1807     "src/compiler/operation-typer.h",
1808     "src/compiler/operator-properties.cc",
1809     "src/compiler/operator-properties.h",
1810     "src/compiler/operator.cc",
1811     "src/compiler/operator.h",
1812     "src/compiler/osr.cc",
1813     "src/compiler/osr.h",
1814     "src/compiler/per-isolate-compiler-cache.h",
1815     "src/compiler/persistent-map.h",
1816     "src/compiler/pipeline-statistics.cc",
1817     "src/compiler/pipeline-statistics.h",
1818     "src/compiler/pipeline.cc",
1819     "src/compiler/pipeline.h",
1820     "src/compiler/property-access-builder.cc",
1821     "src/compiler/property-access-builder.h",
1822     "src/compiler/raw-machine-assembler.cc",
1823     "src/compiler/raw-machine-assembler.h",
1824     "src/compiler/redundancy-elimination.cc",
1825     "src/compiler/redundancy-elimination.h",
1826     "src/compiler/refs-map.cc",
1827     "src/compiler/refs-map.h",
1828     "src/compiler/representation-change.cc",
1829     "src/compiler/representation-change.h",
1830     "src/compiler/schedule.cc",
1831     "src/compiler/schedule.h",
1832     "src/compiler/scheduler.cc",
1833     "src/compiler/scheduler.h",
1834     "src/compiler/select-lowering.cc",
1835     "src/compiler/select-lowering.h",
1836     "src/compiler/serializer-for-background-compilation.cc",
1837     "src/compiler/serializer-for-background-compilation.h",
1838     "src/compiler/simd-scalar-lowering.cc",
1839     "src/compiler/simd-scalar-lowering.h",
1840     "src/compiler/simplified-lowering.cc",
1841     "src/compiler/simplified-lowering.h",
1842     "src/compiler/simplified-operator-reducer.cc",
1843     "src/compiler/simplified-operator-reducer.h",
1844     "src/compiler/simplified-operator.cc",
1845     "src/compiler/simplified-operator.h",
1846     "src/compiler/state-values-utils.cc",
1847     "src/compiler/state-values-utils.h",
1848     "src/compiler/store-store-elimination.cc",
1849     "src/compiler/store-store-elimination.h",
1850     "src/compiler/type-cache.cc",
1851     "src/compiler/type-cache.h",
1852     "src/compiler/type-narrowing-reducer.cc",
1853     "src/compiler/type-narrowing-reducer.h",
1854     "src/compiler/typed-optimization.cc",
1855     "src/compiler/typed-optimization.h",
1856     "src/compiler/typer.cc",
1857     "src/compiler/typer.h",
1858     "src/compiler/types.cc",
1859     "src/compiler/types.h",
1860     "src/compiler/value-numbering-reducer.cc",
1861     "src/compiler/value-numbering-reducer.h",
1862     "src/compiler/verifier.cc",
1863     "src/compiler/verifier.h",
1864     "src/compiler/wasm-compiler.cc",
1865     "src/compiler/wasm-compiler.h",
1866     "src/compiler/zone-stats.cc",
1867     "src/compiler/zone-stats.h",
1868     "src/constant-pool.cc",
1869     "src/constant-pool.h",
1870     "src/constants-arch.h",
1871     "src/contexts-inl.h",
1872     "src/contexts.cc",
1873     "src/contexts.h",
1874     "src/conversions-inl.h",
1875     "src/conversions.cc",
1876     "src/conversions.h",
1877     "src/counters-inl.h",
1878     "src/counters.cc",
1879     "src/counters.h",
1880     "src/cpu-features.h",
1881     "src/date.cc",
1882     "src/date.h",
1883     "src/dateparser-inl.h",
1884     "src/dateparser.cc",
1885     "src/dateparser.h",
1886     "src/debug/debug-coverage.cc",
1887     "src/debug/debug-coverage.h",
1888     "src/debug/debug-evaluate.cc",
1889     "src/debug/debug-evaluate.h",
1890     "src/debug/debug-frames.cc",
1891     "src/debug/debug-frames.h",
1892     "src/debug/debug-interface.h",
1893     "src/debug/debug-property-iterator.cc",
1894     "src/debug/debug-property-iterator.h",
1895     "src/debug/debug-scope-iterator.cc",
1896     "src/debug/debug-scope-iterator.h",
1897     "src/debug/debug-scopes.cc",
1898     "src/debug/debug-scopes.h",
1899     "src/debug/debug-stack-trace-iterator.cc",
1900     "src/debug/debug-stack-trace-iterator.h",
1901     "src/debug/debug-type-profile.cc",
1902     "src/debug/debug-type-profile.h",
1903     "src/debug/debug.cc",
1904     "src/debug/debug.h",
1905     "src/debug/interface-types.h",
1906     "src/debug/liveedit.cc",
1907     "src/debug/liveedit.h",
1908     "src/deoptimize-reason.cc",
1909     "src/deoptimize-reason.h",
1910     "src/deoptimizer.cc",
1911     "src/deoptimizer.h",
1912     "src/detachable-vector.cc",
1913     "src/detachable-vector.h",
1914     "src/disasm.h",
1915     "src/disassembler.cc",
1916     "src/disassembler.h",
1917     "src/diy-fp.cc",
1918     "src/diy-fp.h",
1919     "src/double.h",
1920     "src/dtoa.cc",
1921     "src/dtoa.h",
1922     "src/eh-frame.cc",
1923     "src/eh-frame.h",
1924     "src/elements-inl.h",
1925     "src/elements-kind.cc",
1926     "src/elements-kind.h",
1927     "src/elements.cc",
1928     "src/elements.h",
1929     "src/execution.cc",
1930     "src/execution.h",
1931     "src/extensions/externalize-string-extension.cc",
1932     "src/extensions/externalize-string-extension.h",
1933     "src/extensions/free-buffer-extension.cc",
1934     "src/extensions/free-buffer-extension.h",
1935     "src/extensions/gc-extension.cc",
1936     "src/extensions/gc-extension.h",
1937     "src/extensions/ignition-statistics-extension.cc",
1938     "src/extensions/ignition-statistics-extension.h",
1939     "src/extensions/statistics-extension.cc",
1940     "src/extensions/statistics-extension.h",
1941     "src/extensions/trigger-failure-extension.cc",
1942     "src/extensions/trigger-failure-extension.h",
1943     "src/external-reference-table.cc",
1944     "src/external-reference-table.h",
1945     "src/external-reference.cc",
1946     "src/external-reference.h",
1947     "src/fast-dtoa.cc",
1948     "src/fast-dtoa.h",
1949     "src/feedback-vector-inl.h",
1950     "src/feedback-vector.cc",
1951     "src/feedback-vector.h",
1952     "src/field-index-inl.h",
1953     "src/field-index.h",
1954     "src/field-type.cc",
1955     "src/field-type.h",
1956     "src/fixed-dtoa.cc",
1957     "src/fixed-dtoa.h",
1958     "src/flag-definitions.h",
1959     "src/flags.cc",
1960     "src/flags.h",
1961     "src/frame-constants.h",
1962     "src/frames-inl.h",
1963     "src/frames.cc",
1964     "src/frames.h",
1965     "src/futex-emulation.cc",
1966     "src/futex-emulation.h",
1967     "src/gdb-jit.cc",
1968     "src/gdb-jit.h",
1969     "src/global-handles.cc",
1970     "src/global-handles.h",
1971     "src/globals.h",
1972     "src/handler-table.cc",
1973     "src/handler-table.h",
1974     "src/handles-inl.h",
1975     "src/handles.cc",
1976     "src/handles.h",
1977     "src/heap-symbols.h",
1978     "src/heap/array-buffer-collector.cc",
1979     "src/heap/array-buffer-collector.h",
1980     "src/heap/array-buffer-tracker-inl.h",
1981     "src/heap/array-buffer-tracker.cc",
1982     "src/heap/array-buffer-tracker.h",
1983     "src/heap/barrier.h",
1984     "src/heap/code-stats.cc",
1985     "src/heap/code-stats.h",
1986     "src/heap/concurrent-marking.cc",
1987     "src/heap/concurrent-marking.h",
1988     "src/heap/embedder-tracing.cc",
1989     "src/heap/embedder-tracing.h",
1990     "src/heap/factory-inl.h",
1991     "src/heap/factory.cc",
1992     "src/heap/factory.h",
1993     "src/heap/gc-idle-time-handler.cc",
1994     "src/heap/gc-idle-time-handler.h",
1995     "src/heap/gc-tracer.cc",
1996     "src/heap/gc-tracer.h",
1997     "src/heap/heap-controller.cc",
1998     "src/heap/heap-controller.h",
1999     "src/heap/heap-inl.h",
2000     "src/heap/heap-write-barrier-inl.h",
2001     "src/heap/heap-write-barrier.h",
2002     "src/heap/heap.cc",
2003     "src/heap/heap.h",
2004     "src/heap/incremental-marking-inl.h",
2005     "src/heap/incremental-marking-job.cc",
2006     "src/heap/incremental-marking-job.h",
2007     "src/heap/incremental-marking.cc",
2008     "src/heap/incremental-marking.h",
2009     "src/heap/invalidated-slots-inl.h",
2010     "src/heap/invalidated-slots.cc",
2011     "src/heap/invalidated-slots.h",
2012     "src/heap/item-parallel-job.cc",
2013     "src/heap/item-parallel-job.h",
2014     "src/heap/local-allocator-inl.h",
2015     "src/heap/local-allocator.h",
2016     "src/heap/mark-compact-inl.h",
2017     "src/heap/mark-compact.cc",
2018     "src/heap/mark-compact.h",
2019     "src/heap/marking.cc",
2020     "src/heap/marking.h",
2021     "src/heap/memory-reducer.cc",
2022     "src/heap/memory-reducer.h",
2023     "src/heap/object-stats.cc",
2024     "src/heap/object-stats.h",
2025     "src/heap/objects-visiting-inl.h",
2026     "src/heap/objects-visiting.cc",
2027     "src/heap/objects-visiting.h",
2028     "src/heap/remembered-set.h",
2029     "src/heap/scavenge-job.cc",
2030     "src/heap/scavenge-job.h",
2031     "src/heap/scavenger-inl.h",
2032     "src/heap/scavenger.cc",
2033     "src/heap/scavenger.h",
2034     "src/heap/slot-set.cc",
2035     "src/heap/slot-set.h",
2036     "src/heap/spaces-inl.h",
2037     "src/heap/spaces.cc",
2038     "src/heap/spaces.h",
2039     "src/heap/store-buffer-inl.h",
2040     "src/heap/store-buffer.cc",
2041     "src/heap/store-buffer.h",
2042     "src/heap/stress-marking-observer.cc",
2043     "src/heap/stress-marking-observer.h",
2044     "src/heap/stress-scavenge-observer.cc",
2045     "src/heap/stress-scavenge-observer.h",
2046     "src/heap/sweeper.cc",
2047     "src/heap/sweeper.h",
2048     "src/heap/worklist.h",
2049     "src/ic/call-optimization.cc",
2050     "src/ic/call-optimization.h",
2051     "src/ic/handler-configuration-inl.h",
2052     "src/ic/handler-configuration.cc",
2053     "src/ic/handler-configuration.h",
2054     "src/ic/ic-inl.h",
2055     "src/ic/ic-stats.cc",
2056     "src/ic/ic-stats.h",
2057     "src/ic/ic.cc",
2058     "src/ic/ic.h",
2059     "src/ic/stub-cache.cc",
2060     "src/ic/stub-cache.h",
2061     "src/icu_util.cc",
2062     "src/icu_util.h",
2063     "src/identity-map.cc",
2064     "src/identity-map.h",
2065     "src/interface-descriptors.cc",
2066     "src/interface-descriptors.h",
2067     "src/interpreter/block-coverage-builder.h",
2068     "src/interpreter/bytecode-array-accessor.cc",
2069     "src/interpreter/bytecode-array-accessor.h",
2070     "src/interpreter/bytecode-array-builder.cc",
2071     "src/interpreter/bytecode-array-builder.h",
2072     "src/interpreter/bytecode-array-iterator.cc",
2073     "src/interpreter/bytecode-array-iterator.h",
2074     "src/interpreter/bytecode-array-random-iterator.cc",
2075     "src/interpreter/bytecode-array-random-iterator.h",
2076     "src/interpreter/bytecode-array-writer.cc",
2077     "src/interpreter/bytecode-array-writer.h",
2078     "src/interpreter/bytecode-decoder.cc",
2079     "src/interpreter/bytecode-decoder.h",
2080     "src/interpreter/bytecode-flags.cc",
2081     "src/interpreter/bytecode-flags.h",
2082     "src/interpreter/bytecode-generator.cc",
2083     "src/interpreter/bytecode-generator.h",
2084     "src/interpreter/bytecode-jump-table.h",
2085     "src/interpreter/bytecode-label.cc",
2086     "src/interpreter/bytecode-label.h",
2087     "src/interpreter/bytecode-node.cc",
2088     "src/interpreter/bytecode-node.h",
2089     "src/interpreter/bytecode-operands.cc",
2090     "src/interpreter/bytecode-operands.h",
2091     "src/interpreter/bytecode-register-allocator.h",
2092     "src/interpreter/bytecode-register-optimizer.cc",
2093     "src/interpreter/bytecode-register-optimizer.h",
2094     "src/interpreter/bytecode-register.cc",
2095     "src/interpreter/bytecode-register.h",
2096     "src/interpreter/bytecode-source-info.cc",
2097     "src/interpreter/bytecode-source-info.h",
2098     "src/interpreter/bytecode-traits.h",
2099     "src/interpreter/bytecodes.cc",
2100     "src/interpreter/bytecodes.h",
2101     "src/interpreter/constant-array-builder.cc",
2102     "src/interpreter/constant-array-builder.h",
2103     "src/interpreter/control-flow-builders.cc",
2104     "src/interpreter/control-flow-builders.h",
2105     "src/interpreter/handler-table-builder.cc",
2106     "src/interpreter/handler-table-builder.h",
2107     "src/interpreter/interpreter-generator.h",
2108     "src/interpreter/interpreter-intrinsics.cc",
2109     "src/interpreter/interpreter-intrinsics.h",
2110     "src/interpreter/interpreter.cc",
2111     "src/interpreter/interpreter.h",
2112     "src/isolate-allocator.cc",
2113     "src/isolate-allocator.h",
2114     "src/isolate-data.h",
2115     "src/isolate-inl.h",
2116     "src/isolate.cc",
2117     "src/isolate.h",
2118     "src/json-parser.cc",
2119     "src/json-parser.h",
2120     "src/json-stringifier.cc",
2121     "src/json-stringifier.h",
2122     "src/keys.cc",
2123     "src/keys.h",
2124     "src/label.h",
2125     "src/layout-descriptor-inl.h",
2126     "src/layout-descriptor.cc",
2127     "src/layout-descriptor.h",
2128     "src/locked-queue-inl.h",
2129     "src/locked-queue.h",
2130     "src/log-inl.h",
2131     "src/log-utils.cc",
2132     "src/log-utils.h",
2133     "src/log.cc",
2134     "src/log.h",
2135     "src/lookup-cache-inl.h",
2136     "src/lookup-cache.cc",
2137     "src/lookup-cache.h",
2138     "src/lookup-inl.h",
2139     "src/lookup.cc",
2140     "src/lookup.h",
2141     "src/machine-type.cc",
2142     "src/machine-type.h",
2143     "src/macro-assembler-inl.h",
2144     "src/macro-assembler.h",
2145     "src/map-updater.cc",
2146     "src/map-updater.h",
2147     "src/math-random.cc",
2148     "src/math-random.h",
2149     "src/maybe-handles-inl.h",
2150     "src/maybe-handles.h",
2151     "src/memcopy.cc",
2152     "src/memcopy.h",
2153     "src/message-template.h",
2154     "src/messages.cc",
2155     "src/messages.h",
2156     "src/microtask-queue.cc",
2157     "src/microtask-queue.h",
2158     "src/msan.h",
2159     "src/objects-body-descriptors-inl.h",
2160     "src/objects-body-descriptors.h",
2161     "src/objects-debug.cc",
2162     "src/objects-inl.h",
2163     "src/objects-printer.cc",
2164     "src/objects.cc",
2165     "src/objects.h",
2166     "src/objects/api-callbacks-inl.h",
2167     "src/objects/api-callbacks.h",
2168     "src/objects/arguments-inl.h",
2169     "src/objects/arguments.h",
2170     "src/objects/bigint.cc",
2171     "src/objects/bigint.h",
2172     "src/objects/builtin-function-id.h",
2173     "src/objects/cell-inl.h",
2174     "src/objects/cell.h",
2175     "src/objects/code-inl.h",
2176     "src/objects/code.h",
2177     "src/objects/compilation-cache-inl.h",
2178     "src/objects/compilation-cache.h",
2179     "src/objects/debug-objects-inl.h",
2180     "src/objects/debug-objects.cc",
2181     "src/objects/debug-objects.h",
2182     "src/objects/descriptor-array-inl.h",
2183     "src/objects/descriptor-array.h",
2184     "src/objects/dictionary-inl.h",
2185     "src/objects/dictionary.h",
2186     "src/objects/embedder-data-array-inl.h",
2187     "src/objects/embedder-data-array.cc",
2188     "src/objects/embedder-data-array.h",
2189     "src/objects/embedder-data-slot-inl.h",
2190     "src/objects/embedder-data-slot.h",
2191     "src/objects/feedback-cell-inl.h",
2192     "src/objects/feedback-cell.h",
2193     "src/objects/fixed-array-inl.h",
2194     "src/objects/fixed-array.h",
2195     "src/objects/frame-array-inl.h",
2196     "src/objects/frame-array.h",
2197     "src/objects/hash-table-inl.h",
2198     "src/objects/hash-table.h",
2199     "src/objects/heap-number-inl.h",
2200     "src/objects/heap-number.h",
2201     "src/objects/heap-object-inl.h",
2202     "src/objects/heap-object.h",
2203     "src/objects/instance-type-inl.h",
2204     "src/objects/instance-type.h",
2205     "src/objects/intl-objects.cc",
2206     "src/objects/intl-objects.h",
2207     "src/objects/js-array-buffer-inl.h",
2208     "src/objects/js-array-buffer.cc",
2209     "src/objects/js-array-buffer.h",
2210     "src/objects/js-array-inl.h",
2211     "src/objects/js-array.h",
2212     "src/objects/js-break-iterator-inl.h",
2213     "src/objects/js-break-iterator.cc",
2214     "src/objects/js-break-iterator.h",
2215     "src/objects/js-collator-inl.h",
2216     "src/objects/js-collator.cc",
2217     "src/objects/js-collator.h",
2218     "src/objects/js-collection-inl.h",
2219     "src/objects/js-collection.h",
2220     "src/objects/js-date-time-format-inl.h",
2221     "src/objects/js-date-time-format.cc",
2222     "src/objects/js-date-time-format.h",
2223     "src/objects/js-generator-inl.h",
2224     "src/objects/js-generator.h",
2225     "src/objects/js-list-format-inl.h",
2226     "src/objects/js-list-format.cc",
2227     "src/objects/js-list-format.h",
2228     "src/objects/js-locale-inl.h",
2229     "src/objects/js-locale.cc",
2230     "src/objects/js-locale.h",
2231     "src/objects/js-number-format-inl.h",
2232     "src/objects/js-number-format.cc",
2233     "src/objects/js-number-format.h",
2234     "src/objects/js-objects-inl.h",
2235     "src/objects/js-objects.h",
2236     "src/objects/js-plural-rules-inl.h",
2237     "src/objects/js-plural-rules.cc",
2238     "src/objects/js-plural-rules.h",
2239     "src/objects/js-promise-inl.h",
2240     "src/objects/js-promise.h",
2241     "src/objects/js-proxy-inl.h",
2242     "src/objects/js-proxy.h",
2243     "src/objects/js-regexp-inl.h",
2244     "src/objects/js-regexp-string-iterator-inl.h",
2245     "src/objects/js-regexp-string-iterator.h",
2246     "src/objects/js-regexp.h",
2247     "src/objects/js-relative-time-format-inl.h",
2248     "src/objects/js-relative-time-format.cc",
2249     "src/objects/js-relative-time-format.h",
2250     "src/objects/js-segment-iterator-inl.h",
2251     "src/objects/js-segment-iterator.cc",
2252     "src/objects/js-segment-iterator.h",
2253     "src/objects/js-segmenter-inl.h",
2254     "src/objects/js-segmenter.cc",
2255     "src/objects/js-segmenter.h",
2256     "src/objects/js-weak-refs-inl.h",
2257     "src/objects/js-weak-refs.h",
2258     "src/objects/literal-objects-inl.h",
2259     "src/objects/literal-objects.cc",
2260     "src/objects/literal-objects.h",
2261     "src/objects/managed.cc",
2262     "src/objects/managed.h",
2263     "src/objects/map-inl.h",
2264     "src/objects/map.h",
2265     "src/objects/maybe-object-inl.h",
2266     "src/objects/maybe-object.h",
2267     "src/objects/microtask-inl.h",
2268     "src/objects/microtask.h",
2269     "src/objects/module-inl.h",
2270     "src/objects/module.cc",
2271     "src/objects/module.h",
2272     "src/objects/name-inl.h",
2273     "src/objects/name.h",
2274     "src/objects/object-macros-undef.h",
2275     "src/objects/object-macros.h",
2276     "src/objects/oddball-inl.h",
2277     "src/objects/oddball.h",
2278     "src/objects/ordered-hash-table-inl.h",
2279     "src/objects/ordered-hash-table.cc",
2280     "src/objects/ordered-hash-table.h",
2281     "src/objects/promise-inl.h",
2282     "src/objects/promise.h",
2283     "src/objects/property-array-inl.h",
2284     "src/objects/property-array.h",
2285     "src/objects/property-cell-inl.h",
2286     "src/objects/property-cell.h",
2287     "src/objects/property-descriptor-object-inl.h",
2288     "src/objects/property-descriptor-object.h",
2289     "src/objects/prototype-info-inl.h",
2290     "src/objects/prototype-info.h",
2291     "src/objects/regexp-match-info.h",
2292     "src/objects/scope-info.cc",
2293     "src/objects/scope-info.h",
2294     "src/objects/script-inl.h",
2295     "src/objects/script.h",
2296     "src/objects/shared-function-info-inl.h",
2297     "src/objects/shared-function-info.h",
2298     "src/objects/slots-atomic-inl.h",
2299     "src/objects/slots-inl.h",
2300     "src/objects/slots.h",
2301     "src/objects/stack-frame-info-inl.h",
2302     "src/objects/stack-frame-info.h",
2303     "src/objects/string-inl.h",
2304     "src/objects/string-table-inl.h",
2305     "src/objects/string-table.h",
2306     "src/objects/string.h",
2307     "src/objects/struct-inl.h",
2308     "src/objects/struct.h",
2309     "src/objects/template-objects.cc",
2310     "src/objects/template-objects.h",
2311     "src/objects/templates-inl.h",
2312     "src/objects/templates.h",
2313     "src/optimized-compilation-info.cc",
2314     "src/optimized-compilation-info.h",
2315     "src/ostreams.cc",
2316     "src/ostreams.h",
2317     "src/parsing/expression-scope-reparenter.cc",
2318     "src/parsing/expression-scope-reparenter.h",
2319     "src/parsing/expression-scope.h",
2320     "src/parsing/func-name-inferrer.cc",
2321     "src/parsing/func-name-inferrer.h",
2322     "src/parsing/parse-info.cc",
2323     "src/parsing/parse-info.h",
2324     "src/parsing/parser-base.h",
2325     "src/parsing/parser.cc",
2326     "src/parsing/parser.h",
2327     "src/parsing/parsing.cc",
2328     "src/parsing/parsing.h",
2329     "src/parsing/pattern-rewriter.cc",
2330     "src/parsing/preparse-data-impl.h",
2331     "src/parsing/preparse-data.cc",
2332     "src/parsing/preparse-data.h",
2333     "src/parsing/preparser-logger.h",
2334     "src/parsing/preparser.cc",
2335     "src/parsing/preparser.h",
2336     "src/parsing/rewriter.cc",
2337     "src/parsing/rewriter.h",
2338     "src/parsing/scanner-character-streams.cc",
2339     "src/parsing/scanner-character-streams.h",
2340     "src/parsing/scanner.cc",
2341     "src/parsing/scanner.h",
2342     "src/parsing/token.cc",
2343     "src/parsing/token.h",
2344     "src/pending-compilation-error-handler.cc",
2345     "src/pending-compilation-error-handler.h",
2346     "src/perf-jit.cc",
2347     "src/perf-jit.h",
2348     "src/pointer-with-payload.h",
2349     "src/profiler/allocation-tracker.cc",
2350     "src/profiler/allocation-tracker.h",
2351     "src/profiler/circular-queue-inl.h",
2352     "src/profiler/circular-queue.h",
2353     "src/profiler/cpu-profiler-inl.h",
2354     "src/profiler/cpu-profiler.cc",
2355     "src/profiler/cpu-profiler.h",
2356     "src/profiler/heap-profiler.cc",
2357     "src/profiler/heap-profiler.h",
2358     "src/profiler/heap-snapshot-generator-inl.h",
2359     "src/profiler/heap-snapshot-generator.cc",
2360     "src/profiler/heap-snapshot-generator.h",
2361     "src/profiler/profile-generator-inl.h",
2362     "src/profiler/profile-generator.cc",
2363     "src/profiler/profile-generator.h",
2364     "src/profiler/profiler-listener.cc",
2365     "src/profiler/profiler-listener.h",
2366     "src/profiler/sampling-heap-profiler.cc",
2367     "src/profiler/sampling-heap-profiler.h",
2368     "src/profiler/strings-storage.cc",
2369     "src/profiler/strings-storage.h",
2370     "src/profiler/tick-sample.cc",
2371     "src/profiler/tick-sample.h",
2372     "src/profiler/tracing-cpu-profiler.cc",
2373     "src/profiler/tracing-cpu-profiler.h",
2374     "src/profiler/unbound-queue-inl.h",
2375     "src/profiler/unbound-queue.h",
2376     "src/property-descriptor.cc",
2377     "src/property-descriptor.h",
2378     "src/property-details.h",
2379     "src/property.cc",
2380     "src/property.h",
2381     "src/prototype.h",
2382     "src/ptr-compr-inl.h",
2383     "src/ptr-compr.h",
2384     "src/regexp/bytecodes-irregexp.h",
2385     "src/regexp/interpreter-irregexp.cc",
2386     "src/regexp/interpreter-irregexp.h",
2387     "src/regexp/jsregexp-inl.h",
2388     "src/regexp/jsregexp.cc",
2389     "src/regexp/jsregexp.h",
2390     "src/regexp/property-sequences.cc",
2391     "src/regexp/property-sequences.h",
2392     "src/regexp/regexp-ast.cc",
2393     "src/regexp/regexp-ast.h",
2394     "src/regexp/regexp-macro-assembler-irregexp-inl.h",
2395     "src/regexp/regexp-macro-assembler-irregexp.cc",
2396     "src/regexp/regexp-macro-assembler-irregexp.h",
2397     "src/regexp/regexp-macro-assembler-tracer.cc",
2398     "src/regexp/regexp-macro-assembler-tracer.h",
2399     "src/regexp/regexp-macro-assembler.cc",
2400     "src/regexp/regexp-macro-assembler.h",
2401     "src/regexp/regexp-parser.cc",
2402     "src/regexp/regexp-parser.h",
2403     "src/regexp/regexp-stack.cc",
2404     "src/regexp/regexp-stack.h",
2405     "src/regexp/regexp-utils.cc",
2406     "src/regexp/regexp-utils.h",
2407     "src/register-arch.h",
2408     "src/register-configuration.cc",
2409     "src/register-configuration.h",
2410     "src/register.h",
2411     "src/reglist.h",
2412     "src/reloc-info.cc",
2413     "src/reloc-info.h",
2414     "src/roots-inl.h",
2415     "src/roots.cc",
2416     "src/roots.h",
2417     "src/runtime-profiler.cc",
2418     "src/runtime-profiler.h",
2419     "src/runtime/runtime-array.cc",
2420     "src/runtime/runtime-atomics.cc",
2421     "src/runtime/runtime-bigint.cc",
2422     "src/runtime/runtime-classes.cc",
2423     "src/runtime/runtime-collections.cc",
2424     "src/runtime/runtime-compiler.cc",
2425     "src/runtime/runtime-date.cc",
2426     "src/runtime/runtime-debug.cc",
2427     "src/runtime/runtime-forin.cc",
2428     "src/runtime/runtime-function.cc",
2429     "src/runtime/runtime-futex.cc",
2430     "src/runtime/runtime-generator.cc",
2431     "src/runtime/runtime-internal.cc",
2432     "src/runtime/runtime-interpreter.cc",
2433     "src/runtime/runtime-intl.cc",
2434     "src/runtime/runtime-literals.cc",
2435     "src/runtime/runtime-module.cc",
2436     "src/runtime/runtime-numbers.cc",
2437     "src/runtime/runtime-object.cc",
2438     "src/runtime/runtime-operators.cc",
2439     "src/runtime/runtime-promise.cc",
2440     "src/runtime/runtime-proxy.cc",
2441     "src/runtime/runtime-regexp.cc",
2442     "src/runtime/runtime-scopes.cc",
2443     "src/runtime/runtime-strings.cc",
2444     "src/runtime/runtime-symbol.cc",
2445     "src/runtime/runtime-test.cc",
2446     "src/runtime/runtime-typedarray.cc",
2447     "src/runtime/runtime-utils.h",
2448     "src/runtime/runtime-wasm.cc",
2449     "src/runtime/runtime-weak-refs.cc",
2450     "src/runtime/runtime.cc",
2451     "src/runtime/runtime.h",
2452     "src/safepoint-table.cc",
2453     "src/safepoint-table.h",
2454     "src/setup-isolate.h",
2455     "src/signature.h",
2456     "src/simulator-base.cc",
2457     "src/simulator-base.h",
2458     "src/simulator.h",
2459     "src/snapshot/code-serializer.cc",
2460     "src/snapshot/code-serializer.h",
2461     "src/snapshot/deserializer-allocator.cc",
2462     "src/snapshot/deserializer-allocator.h",
2463     "src/snapshot/deserializer.cc",
2464     "src/snapshot/deserializer.h",
2465     "src/snapshot/embedded-data.cc",
2466     "src/snapshot/embedded-data.h",
2467     "src/snapshot/natives-common.cc",
2468     "src/snapshot/natives.h",
2469     "src/snapshot/object-deserializer.cc",
2470     "src/snapshot/object-deserializer.h",
2471     "src/snapshot/partial-deserializer.cc",
2472     "src/snapshot/partial-deserializer.h",
2473     "src/snapshot/partial-serializer.cc",
2474     "src/snapshot/partial-serializer.h",
2475     "src/snapshot/read-only-deserializer.cc",
2476     "src/snapshot/read-only-deserializer.h",
2477     "src/snapshot/read-only-serializer.cc",
2478     "src/snapshot/read-only-serializer.h",
2479     "src/snapshot/references.h",
2480     "src/snapshot/roots-serializer.cc",
2481     "src/snapshot/roots-serializer.h",
2482     "src/snapshot/serializer-allocator.cc",
2483     "src/snapshot/serializer-allocator.h",
2484     "src/snapshot/serializer-common.cc",
2485     "src/snapshot/serializer-common.h",
2486     "src/snapshot/serializer.cc",
2487     "src/snapshot/serializer.h",
2488     "src/snapshot/snapshot-common.cc",
2489     "src/snapshot/snapshot-source-sink.cc",
2490     "src/snapshot/snapshot-source-sink.h",
2491     "src/snapshot/snapshot.h",
2492     "src/snapshot/startup-deserializer.cc",
2493     "src/snapshot/startup-deserializer.h",
2494     "src/snapshot/startup-serializer.cc",
2495     "src/snapshot/startup-serializer.h",
2496     "src/source-position-table.cc",
2497     "src/source-position-table.h",
2498     "src/source-position.cc",
2499     "src/source-position.h",
2500     "src/splay-tree-inl.h",
2501     "src/splay-tree.h",
2502     "src/startup-data-util.cc",
2503     "src/startup-data-util.h",
2504     "src/string-builder-inl.h",
2505     "src/string-builder.cc",
2506     "src/string-case.cc",
2507     "src/string-case.h",
2508     "src/string-constants.cc",
2509     "src/string-constants.h",
2510     "src/string-hasher-inl.h",
2511     "src/string-hasher.h",
2512     "src/string-search.h",
2513     "src/string-stream.cc",
2514     "src/string-stream.h",
2515     "src/strtod.cc",
2516     "src/strtod.h",
2517     "src/task-utils.cc",
2518     "src/task-utils.h",
2519     "src/third_party/siphash/halfsiphash.cc",
2520     "src/third_party/siphash/halfsiphash.h",
2521     "src/third_party/utf8-decoder/utf8-decoder.h",
2522     "src/thread-id.cc",
2523     "src/thread-id.h",
2524     "src/tracing/trace-event.cc",
2525     "src/tracing/trace-event.h",
2526     "src/tracing/traced-value.cc",
2527     "src/tracing/traced-value.h",
2528     "src/tracing/tracing-category-observer.cc",
2529     "src/tracing/tracing-category-observer.h",
2530     "src/transitions-inl.h",
2531     "src/transitions.cc",
2532     "src/transitions.h",
2533     "src/trap-handler/handler-inside.cc",
2534     "src/trap-handler/handler-outside.cc",
2535     "src/trap-handler/handler-shared.cc",
2536     "src/trap-handler/trap-handler-internal.h",
2537     "src/trap-handler/trap-handler.h",
2538     "src/turbo-assembler.cc",
2539     "src/turbo-assembler.h",
2540     "src/type-hints.cc",
2541     "src/type-hints.h",
2542     "src/unicode-cache.h",
2543     "src/unicode-decoder.cc",
2544     "src/unicode-decoder.h",
2545     "src/unicode-inl.h",
2546     "src/unicode.cc",
2547     "src/unicode.h",
2548     "src/unoptimized-compilation-info.cc",
2549     "src/unoptimized-compilation-info.h",
2550     "src/unwinder.cc",
2551     "src/uri.cc",
2552     "src/uri.h",
2553     "src/utils-inl.h",
2554     "src/utils.cc",
2555     "src/utils.h",
2556     "src/v8.cc",
2557     "src/v8.h",
2558     "src/v8memory.h",
2559     "src/v8threads.cc",
2560     "src/v8threads.h",
2561     "src/value-serializer.cc",
2562     "src/value-serializer.h",
2563     "src/vector-slot-pair.cc",
2564     "src/vector-slot-pair.h",
2565     "src/vector.h",
2566     "src/version.cc",
2567     "src/version.h",
2568     "src/visitors.cc",
2569     "src/visitors.h",
2570     "src/vm-state-inl.h",
2571     "src/vm-state.h",
2572     "src/wasm/baseline/liftoff-assembler-defs.h",
2573     "src/wasm/baseline/liftoff-assembler.cc",
2574     "src/wasm/baseline/liftoff-assembler.h",
2575     "src/wasm/baseline/liftoff-compiler.cc",
2576     "src/wasm/baseline/liftoff-compiler.h",
2577     "src/wasm/baseline/liftoff-register.h",
2578     "src/wasm/compilation-environment.h",
2579     "src/wasm/decoder.h",
2580     "src/wasm/function-body-decoder-impl.h",
2581     "src/wasm/function-body-decoder.cc",
2582     "src/wasm/function-body-decoder.h",
2583     "src/wasm/function-compiler.cc",
2584     "src/wasm/function-compiler.h",
2585     "src/wasm/graph-builder-interface.cc",
2586     "src/wasm/graph-builder-interface.h",
2587     "src/wasm/js-to-wasm-wrapper-cache-inl.h",
2588     "src/wasm/jump-table-assembler.cc",
2589     "src/wasm/jump-table-assembler.h",
2590     "src/wasm/leb-helper.h",
2591     "src/wasm/local-decl-encoder.cc",
2592     "src/wasm/local-decl-encoder.h",
2593     "src/wasm/memory-tracing.cc",
2594     "src/wasm/memory-tracing.h",
2595     "src/wasm/module-compiler.cc",
2596     "src/wasm/module-compiler.h",
2597     "src/wasm/module-decoder.cc",
2598     "src/wasm/module-decoder.h",
2599     "src/wasm/module-instantiate.cc",
2600     "src/wasm/module-instantiate.h",
2601     "src/wasm/object-access.h",
2602     "src/wasm/signature-map.cc",
2603     "src/wasm/signature-map.h",
2604     "src/wasm/streaming-decoder.cc",
2605     "src/wasm/streaming-decoder.h",
2606     "src/wasm/value-type.h",
2607     "src/wasm/wasm-code-manager.cc",
2608     "src/wasm/wasm-code-manager.h",
2609     "src/wasm/wasm-constants.h",
2610     "src/wasm/wasm-debug.cc",
2611     "src/wasm/wasm-engine.cc",
2612     "src/wasm/wasm-engine.h",
2613     "src/wasm/wasm-external-refs.cc",
2614     "src/wasm/wasm-external-refs.h",
2615     "src/wasm/wasm-feature-flags.h",
2616     "src/wasm/wasm-features.cc",
2617     "src/wasm/wasm-features.h",
2618     "src/wasm/wasm-import-wrapper-cache-inl.h",
2619     "src/wasm/wasm-interpreter.cc",
2620     "src/wasm/wasm-interpreter.h",
2621     "src/wasm/wasm-js.cc",
2622     "src/wasm/wasm-js.h",
2623     "src/wasm/wasm-limits.h",
2624     "src/wasm/wasm-linkage.h",
2625     "src/wasm/wasm-memory.cc",
2626     "src/wasm/wasm-memory.h",
2627     "src/wasm/wasm-module-builder.cc",
2628     "src/wasm/wasm-module-builder.h",
2629     "src/wasm/wasm-module.cc",
2630     "src/wasm/wasm-module.h",
2631     "src/wasm/wasm-objects-inl.h",
2632     "src/wasm/wasm-objects.cc",
2633     "src/wasm/wasm-objects.h",
2634     "src/wasm/wasm-opcodes.cc",
2635     "src/wasm/wasm-opcodes.h",
2636     "src/wasm/wasm-result.cc",
2637     "src/wasm/wasm-result.h",
2638     "src/wasm/wasm-serialization.cc",
2639     "src/wasm/wasm-serialization.h",
2640     "src/wasm/wasm-text.cc",
2641     "src/wasm/wasm-text.h",
2642     "src/wasm/wasm-tier.h",
2643     "src/wasm/wasm-value.h",
2644     "src/zone/accounting-allocator.cc",
2645     "src/zone/accounting-allocator.h",
2646     "src/zone/zone-allocator.h",
2647     "src/zone/zone-chunk-list.h",
2648     "src/zone/zone-containers.h",
2649     "src/zone/zone-handle-set.h",
2650     "src/zone/zone-list-inl.h",
2651     "src/zone/zone-segment.cc",
2652     "src/zone/zone-segment.h",
2653     "src/zone/zone.cc",
2654     "src/zone/zone.h",
2655   ]
2656
2657   if (v8_check_header_includes) {
2658     # This file will be generated by tools/generate-header-include-checks.py
2659     # if the "check_v8_header_includes" gclient variable is set.
2660     import("check-header-includes/sources.gni")
2661     sources += check_header_includes_sources
2662   }
2663
2664   if (use_jumbo_build == true) {
2665     jumbo_excluded_sources = [
2666       # TODO(mostynb@vewd.com): don't exclude these http://crbug.com/752428
2667       "src/profiler/heap-snapshot-generator.cc",  # Macro clash in mman-linux.h
2668
2669       # These source files take an unusually large amount of time to
2670       # compile.  Build them separately to avoid bottlenecks.
2671       "src/api.cc",
2672       "src/elements.cc",
2673       "src/heap/heap.cc",
2674       "src/objects.cc",
2675       "src/parsing/parser.cc",
2676     ]
2677   }
2678
2679   if (v8_current_cpu == "x86") {
2680     sources += [  ### gcmole(arch:ia32) ###
2681       "src/compiler/backend/ia32/code-generator-ia32.cc",
2682       "src/compiler/backend/ia32/instruction-codes-ia32.h",
2683       "src/compiler/backend/ia32/instruction-scheduler-ia32.cc",
2684       "src/compiler/backend/ia32/instruction-selector-ia32.cc",
2685       "src/debug/ia32/debug-ia32.cc",
2686       "src/ia32/assembler-ia32-inl.h",
2687       "src/ia32/assembler-ia32.cc",
2688       "src/ia32/assembler-ia32.h",
2689       "src/ia32/constants-ia32.h",
2690       "src/ia32/cpu-ia32.cc",
2691       "src/ia32/deoptimizer-ia32.cc",
2692       "src/ia32/disasm-ia32.cc",
2693       "src/ia32/frame-constants-ia32.cc",
2694       "src/ia32/frame-constants-ia32.h",
2695       "src/ia32/interface-descriptors-ia32.cc",
2696       "src/ia32/macro-assembler-ia32.cc",
2697       "src/ia32/macro-assembler-ia32.h",
2698       "src/ia32/register-ia32.h",
2699       "src/ia32/sse-instr.h",
2700       "src/regexp/ia32/regexp-macro-assembler-ia32.cc",
2701       "src/regexp/ia32/regexp-macro-assembler-ia32.h",
2702       "src/wasm/baseline/ia32/liftoff-assembler-ia32.h",
2703     ]
2704   } else if (v8_current_cpu == "x64") {
2705     sources += [  ### gcmole(arch:x64) ###
2706       "src/compiler/backend/x64/code-generator-x64.cc",
2707       "src/compiler/backend/x64/instruction-codes-x64.h",
2708       "src/compiler/backend/x64/instruction-scheduler-x64.cc",
2709       "src/compiler/backend/x64/instruction-selector-x64.cc",
2710       "src/compiler/backend/x64/unwinding-info-writer-x64.cc",
2711       "src/compiler/backend/x64/unwinding-info-writer-x64.h",
2712       "src/debug/x64/debug-x64.cc",
2713       "src/regexp/x64/regexp-macro-assembler-x64.cc",
2714       "src/regexp/x64/regexp-macro-assembler-x64.h",
2715       "src/third_party/valgrind/valgrind.h",
2716       "src/wasm/baseline/x64/liftoff-assembler-x64.h",
2717       "src/x64/assembler-x64-inl.h",
2718       "src/x64/assembler-x64.cc",
2719       "src/x64/assembler-x64.h",
2720       "src/x64/constants-x64.h",
2721       "src/x64/cpu-x64.cc",
2722       "src/x64/deoptimizer-x64.cc",
2723       "src/x64/disasm-x64.cc",
2724       "src/x64/eh-frame-x64.cc",
2725       "src/x64/frame-constants-x64.cc",
2726       "src/x64/frame-constants-x64.h",
2727       "src/x64/interface-descriptors-x64.cc",
2728       "src/x64/macro-assembler-x64.cc",
2729       "src/x64/macro-assembler-x64.h",
2730       "src/x64/register-x64.h",
2731       "src/x64/sse-instr.h",
2732     ]
2733     if (is_linux || is_mac) {
2734       sources += [
2735         "src/trap-handler/handler-inside-posix.cc",
2736         "src/trap-handler/handler-inside-posix.h",
2737         "src/trap-handler/handler-outside-posix.cc",
2738       ]
2739     }
2740     if (is_win) {
2741       sources += [
2742         "src/trap-handler/handler-inside-win.cc",
2743         "src/trap-handler/handler-inside-win.h",
2744         "src/trap-handler/handler-outside-win.cc",
2745       ]
2746     }
2747   } else if (v8_current_cpu == "arm") {
2748     sources += [  ### gcmole(arch:arm) ###
2749       "src/arm/assembler-arm-inl.h",
2750       "src/arm/assembler-arm.cc",
2751       "src/arm/assembler-arm.h",
2752       "src/arm/constants-arm.cc",
2753       "src/arm/constants-arm.h",
2754       "src/arm/cpu-arm.cc",
2755       "src/arm/deoptimizer-arm.cc",
2756       "src/arm/disasm-arm.cc",
2757       "src/arm/eh-frame-arm.cc",
2758       "src/arm/frame-constants-arm.cc",
2759       "src/arm/frame-constants-arm.h",
2760       "src/arm/interface-descriptors-arm.cc",
2761       "src/arm/macro-assembler-arm.cc",
2762       "src/arm/macro-assembler-arm.h",
2763       "src/arm/register-arm.h",
2764       "src/arm/simulator-arm.cc",
2765       "src/arm/simulator-arm.h",
2766       "src/compiler/backend/arm/code-generator-arm.cc",
2767       "src/compiler/backend/arm/instruction-codes-arm.h",
2768       "src/compiler/backend/arm/instruction-scheduler-arm.cc",
2769       "src/compiler/backend/arm/instruction-selector-arm.cc",
2770       "src/compiler/backend/arm/unwinding-info-writer-arm.cc",
2771       "src/compiler/backend/arm/unwinding-info-writer-arm.h",
2772       "src/debug/arm/debug-arm.cc",
2773       "src/regexp/arm/regexp-macro-assembler-arm.cc",
2774       "src/regexp/arm/regexp-macro-assembler-arm.h",
2775       "src/wasm/baseline/arm/liftoff-assembler-arm.h",
2776     ]
2777   } else if (v8_current_cpu == "arm64") {
2778     sources += [  ### gcmole(arch:arm64) ###
2779       "src/arm64/assembler-arm64-inl.h",
2780       "src/arm64/assembler-arm64.cc",
2781       "src/arm64/assembler-arm64.h",
2782       "src/arm64/constants-arm64.h",
2783       "src/arm64/cpu-arm64.cc",
2784       "src/arm64/decoder-arm64-inl.h",
2785       "src/arm64/decoder-arm64.cc",
2786       "src/arm64/decoder-arm64.h",
2787       "src/arm64/deoptimizer-arm64.cc",
2788       "src/arm64/disasm-arm64.cc",
2789       "src/arm64/disasm-arm64.h",
2790       "src/arm64/eh-frame-arm64.cc",
2791       "src/arm64/frame-constants-arm64.cc",
2792       "src/arm64/frame-constants-arm64.h",
2793       "src/arm64/instructions-arm64-constants.cc",
2794       "src/arm64/instructions-arm64.cc",
2795       "src/arm64/instructions-arm64.h",
2796       "src/arm64/instrument-arm64.cc",
2797       "src/arm64/instrument-arm64.h",
2798       "src/arm64/interface-descriptors-arm64.cc",
2799       "src/arm64/macro-assembler-arm64-inl.h",
2800       "src/arm64/macro-assembler-arm64.cc",
2801       "src/arm64/macro-assembler-arm64.h",
2802       "src/arm64/register-arm64.cc",
2803       "src/arm64/register-arm64.h",
2804       "src/arm64/simulator-arm64.cc",
2805       "src/arm64/simulator-arm64.h",
2806       "src/arm64/simulator-logic-arm64.cc",
2807       "src/arm64/utils-arm64.cc",
2808       "src/arm64/utils-arm64.h",
2809       "src/compiler/backend/arm64/code-generator-arm64.cc",
2810       "src/compiler/backend/arm64/instruction-codes-arm64.h",
2811       "src/compiler/backend/arm64/instruction-scheduler-arm64.cc",
2812       "src/compiler/backend/arm64/instruction-selector-arm64.cc",
2813       "src/compiler/backend/arm64/unwinding-info-writer-arm64.cc",
2814       "src/compiler/backend/arm64/unwinding-info-writer-arm64.h",
2815       "src/debug/arm64/debug-arm64.cc",
2816       "src/regexp/arm64/regexp-macro-assembler-arm64.cc",
2817       "src/regexp/arm64/regexp-macro-assembler-arm64.h",
2818       "src/wasm/baseline/arm64/liftoff-assembler-arm64.h",
2819     ]
2820     if (use_jumbo_build) {
2821       jumbo_excluded_sources += [
2822         # TODO(mostynb@vewd.com): fix this code so it doesn't need
2823         # to be excluded, see the comments inside.
2824         "src/arm64/instructions-arm64-constants.cc",
2825       ]
2826     }
2827   } else if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel") {
2828     sources += [  ### gcmole(arch:mipsel) ###
2829       "src/compiler/backend/mips/code-generator-mips.cc",
2830       "src/compiler/backend/mips/instruction-codes-mips.h",
2831       "src/compiler/backend/mips/instruction-scheduler-mips.cc",
2832       "src/compiler/backend/mips/instruction-selector-mips.cc",
2833       "src/debug/mips/debug-mips.cc",
2834       "src/mips/assembler-mips-inl.h",
2835       "src/mips/assembler-mips.cc",
2836       "src/mips/assembler-mips.h",
2837       "src/mips/constants-mips.cc",
2838       "src/mips/constants-mips.h",
2839       "src/mips/cpu-mips.cc",
2840       "src/mips/deoptimizer-mips.cc",
2841       "src/mips/disasm-mips.cc",
2842       "src/mips/frame-constants-mips.cc",
2843       "src/mips/frame-constants-mips.h",
2844       "src/mips/interface-descriptors-mips.cc",
2845       "src/mips/macro-assembler-mips.cc",
2846       "src/mips/macro-assembler-mips.h",
2847       "src/mips/register-mips.h",
2848       "src/mips/simulator-mips.cc",
2849       "src/mips/simulator-mips.h",
2850       "src/regexp/mips/regexp-macro-assembler-mips.cc",
2851       "src/regexp/mips/regexp-macro-assembler-mips.h",
2852       "src/wasm/baseline/mips/liftoff-assembler-mips.h",
2853     ]
2854   } else if (v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") {
2855     sources += [  ### gcmole(arch:mips64el) ###
2856       "src/compiler/backend/mips64/code-generator-mips64.cc",
2857       "src/compiler/backend/mips64/instruction-codes-mips64.h",
2858       "src/compiler/backend/mips64/instruction-scheduler-mips64.cc",
2859       "src/compiler/backend/mips64/instruction-selector-mips64.cc",
2860       "src/debug/mips64/debug-mips64.cc",
2861       "src/mips64/assembler-mips64-inl.h",
2862       "src/mips64/assembler-mips64.cc",
2863       "src/mips64/assembler-mips64.h",
2864       "src/mips64/constants-mips64.cc",
2865       "src/mips64/constants-mips64.h",
2866       "src/mips64/cpu-mips64.cc",
2867       "src/mips64/deoptimizer-mips64.cc",
2868       "src/mips64/disasm-mips64.cc",
2869       "src/mips64/frame-constants-mips64.cc",
2870       "src/mips64/frame-constants-mips64.h",
2871       "src/mips64/interface-descriptors-mips64.cc",
2872       "src/mips64/macro-assembler-mips64.cc",
2873       "src/mips64/macro-assembler-mips64.h",
2874       "src/mips64/register-mips64.h",
2875       "src/mips64/simulator-mips64.cc",
2876       "src/mips64/simulator-mips64.h",
2877       "src/regexp/mips64/regexp-macro-assembler-mips64.cc",
2878       "src/regexp/mips64/regexp-macro-assembler-mips64.h",
2879       "src/wasm/baseline/mips64/liftoff-assembler-mips64.h",
2880     ]
2881   } else if (v8_current_cpu == "ppc" || v8_current_cpu == "ppc64") {
2882     sources += [  ### gcmole(arch:ppc) ###
2883       "src/compiler/backend/ppc/code-generator-ppc.cc",
2884       "src/compiler/backend/ppc/instruction-codes-ppc.h",
2885       "src/compiler/backend/ppc/instruction-scheduler-ppc.cc",
2886       "src/compiler/backend/ppc/instruction-selector-ppc.cc",
2887       "src/debug/ppc/debug-ppc.cc",
2888       "src/ppc/assembler-ppc-inl.h",
2889       "src/ppc/assembler-ppc.cc",
2890       "src/ppc/assembler-ppc.h",
2891       "src/ppc/constants-ppc.cc",
2892       "src/ppc/constants-ppc.h",
2893       "src/ppc/cpu-ppc.cc",
2894       "src/ppc/deoptimizer-ppc.cc",
2895       "src/ppc/disasm-ppc.cc",
2896       "src/ppc/frame-constants-ppc.cc",
2897       "src/ppc/frame-constants-ppc.h",
2898       "src/ppc/interface-descriptors-ppc.cc",
2899       "src/ppc/macro-assembler-ppc.cc",
2900       "src/ppc/macro-assembler-ppc.h",
2901       "src/ppc/register-ppc.h",
2902       "src/ppc/simulator-ppc.cc",
2903       "src/ppc/simulator-ppc.h",
2904       "src/regexp/ppc/regexp-macro-assembler-ppc.cc",
2905       "src/regexp/ppc/regexp-macro-assembler-ppc.h",
2906       "src/wasm/baseline/ppc/liftoff-assembler-ppc.h",
2907     ]
2908   } else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") {
2909     sources += [  ### gcmole(arch:s390) ###
2910       "src/compiler/backend/s390/code-generator-s390.cc",
2911       "src/compiler/backend/s390/instruction-codes-s390.h",
2912       "src/compiler/backend/s390/instruction-scheduler-s390.cc",
2913       "src/compiler/backend/s390/instruction-selector-s390.cc",
2914       "src/debug/s390/debug-s390.cc",
2915       "src/regexp/s390/regexp-macro-assembler-s390.cc",
2916       "src/regexp/s390/regexp-macro-assembler-s390.h",
2917       "src/s390/assembler-s390-inl.h",
2918       "src/s390/assembler-s390.cc",
2919       "src/s390/assembler-s390.h",
2920       "src/s390/constants-s390.cc",
2921       "src/s390/constants-s390.h",
2922       "src/s390/cpu-s390.cc",
2923       "src/s390/deoptimizer-s390.cc",
2924       "src/s390/disasm-s390.cc",
2925       "src/s390/frame-constants-s390.cc",
2926       "src/s390/frame-constants-s390.h",
2927       "src/s390/interface-descriptors-s390.cc",
2928       "src/s390/macro-assembler-s390.cc",
2929       "src/s390/macro-assembler-s390.h",
2930       "src/s390/register-s390.h",
2931       "src/s390/simulator-s390.cc",
2932       "src/s390/simulator-s390.h",
2933       "src/wasm/baseline/s390/liftoff-assembler-s390.h",
2934     ]
2935   }
2936
2937   configs = [ ":internal_config" ]
2938
2939   defines = []
2940   deps = [
2941     ":generate_bytecode_builtins_list",
2942     ":run_torque",
2943     ":v8_headers",
2944     ":v8_libbase",
2945     ":v8_libsampler",
2946     "src/inspector:inspector",
2947   ]
2948
2949   if (v8_enable_i18n_support) {
2950     public_deps = [
2951       "//third_party/icu",
2952     ]
2953     if (is_win) {
2954       deps += [ "//third_party/icu:icudata" ]
2955     }
2956   } else {
2957     sources -= [
2958       "src/builtins/builtins-intl.cc",
2959       "src/char-predicates.cc",
2960       "src/objects/intl-objects.cc",
2961       "src/objects/intl-objects.h",
2962       "src/objects/js-break-iterator-inl.h",
2963       "src/objects/js-break-iterator.cc",
2964       "src/objects/js-break-iterator.h",
2965       "src/objects/js-collator-inl.h",
2966       "src/objects/js-collator.cc",
2967       "src/objects/js-collator.h",
2968       "src/objects/js-date-time-format-inl.h",
2969       "src/objects/js-date-time-format.cc",
2970       "src/objects/js-date-time-format.h",
2971       "src/objects/js-list-format-inl.h",
2972       "src/objects/js-list-format.cc",
2973       "src/objects/js-list-format.h",
2974       "src/objects/js-locale-inl.h",
2975       "src/objects/js-locale.cc",
2976       "src/objects/js-locale.h",
2977       "src/objects/js-number-format-inl.h",
2978       "src/objects/js-number-format.cc",
2979       "src/objects/js-number-format.h",
2980       "src/objects/js-plural-rules-inl.h",
2981       "src/objects/js-plural-rules.cc",
2982       "src/objects/js-plural-rules.h",
2983       "src/objects/js-relative-time-format-inl.h",
2984       "src/objects/js-relative-time-format.cc",
2985       "src/objects/js-relative-time-format.h",
2986       "src/objects/js-segment-iterator-inl.h",
2987       "src/objects/js-segment-iterator.cc",
2988       "src/objects/js-segment-iterator.h",
2989       "src/objects/js-segmenter-inl.h",
2990       "src/objects/js-segmenter.cc",
2991       "src/objects/js-segmenter.h",
2992       "src/runtime/runtime-intl.cc",
2993     ]
2994   }
2995
2996   if (v8_postmortem_support) {
2997     sources += [ "$target_gen_dir/debug-support.cc" ]
2998     deps += [ ":postmortem-metadata" ]
2999   }
3000
3001   # Platforms that don't have CAS support need to link atomic library
3002   # to implement atomic memory access
3003   if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel" ||
3004       v8_current_cpu == "mips64" || v8_current_cpu == "mips64el" ||
3005       v8_current_cpu == "ppc" || v8_current_cpu == "ppc64" ||
3006       v8_current_cpu == "s390" || v8_current_cpu == "s390x") {
3007     libs = [ "atomic" ]
3008   }
3009 }
3010
3011 v8_source_set("torque_base") {
3012   visibility = [ ":*" ]  # Only targets in this file can depend on this.
3013
3014   sources = [
3015     "src/torque/ast.h",
3016     "src/torque/cfg.cc",
3017     "src/torque/cfg.h",
3018     "src/torque/contextual.h",
3019     "src/torque/csa-generator.cc",
3020     "src/torque/csa-generator.h",
3021     "src/torque/declarable.cc",
3022     "src/torque/declarable.h",
3023     "src/torque/declaration-visitor.cc",
3024     "src/torque/declaration-visitor.h",
3025     "src/torque/declarations.cc",
3026     "src/torque/declarations.h",
3027     "src/torque/earley-parser.cc",
3028     "src/torque/earley-parser.h",
3029     "src/torque/file-visitor.cc",
3030     "src/torque/file-visitor.h",
3031     "src/torque/global-context.h",
3032     "src/torque/implementation-visitor.cc",
3033     "src/torque/implementation-visitor.h",
3034     "src/torque/instructions.cc",
3035     "src/torque/instructions.h",
3036     "src/torque/source-positions.cc",
3037     "src/torque/source-positions.h",
3038     "src/torque/torque-parser.cc",
3039     "src/torque/torque-parser.h",
3040     "src/torque/type-oracle.cc",
3041     "src/torque/type-oracle.h",
3042     "src/torque/types.cc",
3043     "src/torque/types.h",
3044     "src/torque/utils.cc",
3045     "src/torque/utils.h",
3046   ]
3047
3048   deps = [
3049     ":v8_libbase",
3050   ]
3051
3052   configs = [ ":internal_config" ]
3053   if (is_win && is_asan) {
3054     remove_configs = [ "//build/config/sanitizers:default_sanitizer_flags" ]
3055   }
3056 }
3057
3058 v8_component("v8_libbase") {
3059   sources = [
3060     "src/base/adapters.h",
3061     "src/base/address-region.h",
3062     "src/base/atomic-utils.h",
3063     "src/base/atomicops.h",
3064     "src/base/atomicops_internals_atomicword_compat.h",
3065     "src/base/atomicops_internals_portable.h",
3066     "src/base/atomicops_internals_std.h",
3067     "src/base/base-export.h",
3068     "src/base/bits.cc",
3069     "src/base/bits.h",
3070     "src/base/bounded-page-allocator.cc",
3071     "src/base/bounded-page-allocator.h",
3072     "src/base/build_config.h",
3073     "src/base/compiler-specific.h",
3074     "src/base/cpu.cc",
3075     "src/base/cpu.h",
3076     "src/base/debug/stack_trace.cc",
3077     "src/base/debug/stack_trace.h",
3078     "src/base/division-by-constant.cc",
3079     "src/base/division-by-constant.h",
3080     "src/base/enum-set.h",
3081     "src/base/export-template.h",
3082     "src/base/file-utils.cc",
3083     "src/base/file-utils.h",
3084     "src/base/flags.h",
3085     "src/base/format-macros.h",
3086     "src/base/free_deleter.h",
3087     "src/base/functional.cc",
3088     "src/base/functional.h",
3089     "src/base/hashmap-entry.h",
3090     "src/base/hashmap.h",
3091     "src/base/ieee754.cc",
3092     "src/base/ieee754.h",
3093     "src/base/iterator.h",
3094     "src/base/lazy-instance.h",
3095     "src/base/list.h",
3096     "src/base/logging.cc",
3097     "src/base/logging.h",
3098     "src/base/lsan-page-allocator.cc",
3099     "src/base/lsan-page-allocator.h",
3100     "src/base/macros.h",
3101     "src/base/once.cc",
3102     "src/base/once.h",
3103     "src/base/optional.h",
3104     "src/base/overflowing-math.h",
3105     "src/base/page-allocator.cc",
3106     "src/base/page-allocator.h",
3107     "src/base/platform/condition-variable.cc",
3108     "src/base/platform/condition-variable.h",
3109     "src/base/platform/elapsed-timer.h",
3110     "src/base/platform/mutex.cc",
3111     "src/base/platform/mutex.h",
3112     "src/base/platform/platform.h",
3113     "src/base/platform/semaphore.cc",
3114     "src/base/platform/semaphore.h",
3115     "src/base/platform/time.cc",
3116     "src/base/platform/time.h",
3117     "src/base/region-allocator.cc",
3118     "src/base/region-allocator.h",
3119     "src/base/ring-buffer.h",
3120     "src/base/safe_conversions.h",
3121     "src/base/safe_conversions_impl.h",
3122     "src/base/safe_math.h",
3123     "src/base/safe_math_impl.h",
3124     "src/base/small-vector.h",
3125     "src/base/sys-info.cc",
3126     "src/base/sys-info.h",
3127     "src/base/template-utils.h",
3128     "src/base/timezone-cache.h",
3129     "src/base/tsan.h",
3130     "src/base/utils/random-number-generator.cc",
3131     "src/base/utils/random-number-generator.h",
3132   ]
3133
3134   configs = [ ":internal_config_base" ]
3135
3136   public_configs = [ ":libbase_config" ]
3137
3138   public_deps = []
3139
3140   data = []
3141
3142   data_deps = []
3143
3144   defines = []
3145
3146   if (is_component_build) {
3147     defines = [ "BUILDING_V8_BASE_SHARED" ]
3148   }
3149
3150   if (is_posix || is_fuchsia) {
3151     sources += [
3152       "src/base/platform/platform-posix.cc",
3153       "src/base/platform/platform-posix.h",
3154     ]
3155     if (current_os != "aix") {
3156       sources += [
3157         "src/base/platform/platform-posix-time.cc",
3158         "src/base/platform/platform-posix-time.h",
3159       ]
3160     }
3161   }
3162
3163   if (is_linux || is_tizen) {
3164     sources += [
3165       "src/base/debug/stack_trace_posix.cc",
3166       "src/base/platform/platform-linux.cc",
3167     ]
3168     libs = [
3169       "dl",
3170       "rt",
3171     ]
3172     if (is_tizen) {
3173       libs += [
3174         "dlog",
3175         "pthread",
3176       ]
3177     }
3178   } else if (current_os == "aix") {
3179     sources += [
3180       "src/base/debug/stack_trace_posix.cc",
3181       "src/base/platform/platform-aix.cc",
3182     ]
3183     libs = [
3184       "dl",
3185       "rt",
3186     ]
3187   } else if (is_android) {
3188     if (current_toolchain == host_toolchain) {
3189       libs = [
3190         "dl",
3191         "rt",
3192       ]
3193       if (host_os == "mac") {
3194         sources += [
3195           "src/base/debug/stack_trace_posix.cc",
3196           "src/base/platform/platform-macos.cc",
3197         ]
3198       } else {
3199         sources += [
3200           "src/base/debug/stack_trace_posix.cc",
3201           "src/base/platform/platform-linux.cc",
3202         ]
3203       }
3204     } else {
3205       sources += [
3206         "src/base/debug/stack_trace_android.cc",
3207         "src/base/platform/platform-linux.cc",
3208       ]
3209     }
3210   } else if (is_fuchsia) {
3211     sources += [
3212       "src/base/debug/stack_trace_fuchsia.cc",
3213       "src/base/platform/platform-fuchsia.cc",
3214     ]
3215   } else if (is_mac) {
3216     sources += [
3217       "src/base/debug/stack_trace_posix.cc",
3218       "src/base/platform/platform-macos.cc",
3219     ]
3220   } else if (is_win) {
3221     # TODO(jochen): Add support for cygwin.
3222     sources += [
3223       "src/base/debug/stack_trace_win.cc",
3224       "src/base/platform/platform-win32.cc",
3225       "src/base/win32-headers.h",
3226     ]
3227
3228     defines += [ "_CRT_RAND_S" ]  # for rand_s()
3229
3230     libs = [
3231       "dbghelp.lib",
3232       "shlwapi.lib",
3233       "winmm.lib",
3234       "ws2_32.lib",
3235     ]
3236
3237     data_deps += [ "//build/win:runtime_libs" ]
3238   }
3239
3240   if (v8_current_cpu == "mips" || v8_current_cpu == "mips64") {
3241     # Add runtime libs for mips.
3242     data += [
3243       "tools/mips_toolchain/sysroot/usr/lib/",
3244       "tools/mips_toolchain/mips-mti-linux-gnu/lib",
3245     ]
3246   }
3247
3248   if (is_tsan && !build_with_chromium) {
3249     data += [ "tools/sanitizers/tsan_suppressions.txt" ]
3250   }
3251
3252   # TODO(jochen): Add support for qnx, freebsd, openbsd, netbsd, and solaris.
3253 }
3254
3255 v8_component("v8_libplatform") {
3256   sources = [
3257     "//base/trace_event/common/trace_event_common.h",
3258     "include/libplatform/libplatform-export.h",
3259     "include/libplatform/libplatform.h",
3260     "include/libplatform/v8-tracing.h",
3261     "src/libplatform/default-foreground-task-runner.cc",
3262     "src/libplatform/default-foreground-task-runner.h",
3263     "src/libplatform/default-platform.cc",
3264     "src/libplatform/default-platform.h",
3265     "src/libplatform/default-worker-threads-task-runner.cc",
3266     "src/libplatform/default-worker-threads-task-runner.h",
3267     "src/libplatform/task-queue.cc",
3268     "src/libplatform/task-queue.h",
3269     "src/libplatform/tracing/trace-buffer.cc",
3270     "src/libplatform/tracing/trace-buffer.h",
3271     "src/libplatform/tracing/trace-config.cc",
3272     "src/libplatform/tracing/trace-object.cc",
3273     "src/libplatform/tracing/trace-writer.cc",
3274     "src/libplatform/tracing/trace-writer.h",
3275     "src/libplatform/tracing/tracing-controller.cc",
3276     "src/libplatform/worker-thread.cc",
3277     "src/libplatform/worker-thread.h",
3278   ]
3279
3280   configs = [ ":internal_config_base" ]
3281
3282   if (is_component_build) {
3283     defines = [ "BUILDING_V8_PLATFORM_SHARED" ]
3284   }
3285
3286   public_configs = [ ":libplatform_config" ]
3287
3288   deps = [
3289     ":v8_libbase",
3290   ]
3291 }
3292
3293 v8_source_set("v8_libsampler") {
3294   sources = [
3295     "src/libsampler/sampler.cc",
3296     "src/libsampler/sampler.h",
3297   ]
3298
3299   configs = [ ":internal_config_base" ]
3300
3301   public_configs = [ ":libsampler_config" ]
3302
3303   deps = [
3304     ":v8_libbase",
3305   ]
3306 }
3307
3308 v8_source_set("fuzzer_support") {
3309   visibility = [ ":*" ]  # Only targets in this file can depend on this.
3310
3311   sources = [
3312     "test/fuzzer/fuzzer-support.cc",
3313     "test/fuzzer/fuzzer-support.h",
3314   ]
3315
3316   configs = [ ":internal_config_base" ]
3317
3318   deps = [
3319     ":v8",
3320   ]
3321
3322   public_deps = [
3323     ":v8_libbase",
3324     ":v8_libplatform",
3325   ]
3326
3327   if (v8_enable_i18n_support) {
3328     public_deps += [ "//third_party/icu" ]
3329   }
3330 }
3331
3332 ###############################################################################
3333 # Produce a single static library for embedders
3334 #
3335
3336 if (v8_monolithic) {
3337   # A component build is not monolithic.
3338   assert(!is_component_build)
3339
3340   # Using external startup data would produce separate files.
3341   assert(!v8_use_external_startup_data)
3342   v8_static_library("v8_monolith") {
3343     deps = [
3344       ":v8",
3345       ":v8_libbase",
3346       ":v8_libplatform",
3347       ":v8_libsampler",
3348       "//build/win:default_exe_manifest",
3349     ]
3350
3351     configs = [ ":internal_config" ]
3352   }
3353 }
3354
3355 ###############################################################################
3356 # Executables
3357 #
3358
3359 if (current_toolchain == v8_generator_toolchain) {
3360   v8_executable("bytecode_builtins_list_generator") {
3361     visibility = [ ":*" ]  # Only targets in this file can depend on this.
3362
3363     include_dirs = [ "." ]
3364
3365     sources = [
3366       "src/builtins/generate-bytecodes-builtins-list.cc",
3367       "src/interpreter/bytecode-operands.cc",
3368       "src/interpreter/bytecode-operands.h",
3369       "src/interpreter/bytecodes.cc",
3370       "src/interpreter/bytecodes.h",
3371     ]
3372
3373     configs = [ ":internal_config" ]
3374
3375     deps = [
3376       ":v8_libbase",
3377       "//build/win:default_exe_manifest",
3378     ]
3379   }
3380 }
3381
3382 if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) {
3383   v8_executable("mksnapshot") {
3384     visibility = [ ":*" ]  # Only targets in this file can depend on this.
3385
3386     sources = [
3387       "src/snapshot/embedded-file-writer.cc",
3388       "src/snapshot/embedded-file-writer.h",
3389       "src/snapshot/mksnapshot.cc",
3390     ]
3391
3392     configs = [ ":internal_config" ]
3393
3394     deps = [
3395       ":v8_base",
3396       ":v8_init",
3397       ":v8_libbase",
3398       ":v8_libplatform",
3399       ":v8_nosnapshot",
3400       "//build/win:default_exe_manifest",
3401     ]
3402
3403     if (target_os == "fuchsia") {
3404       defines = [ "V8_TARGET_OS_FUCHSIA" ]
3405     }
3406   }
3407 }
3408
3409 if (current_toolchain == v8_snapshot_toolchain) {
3410   v8_executable("torque") {
3411     visibility = [ ":*" ]  # Only targets in this file can depend on this.
3412
3413     sources = [
3414       "src/torque/torque.cc",
3415     ]
3416
3417     deps = [
3418       ":torque_base",
3419       "//build/win:default_exe_manifest",
3420     ]
3421
3422     configs = [ ":internal_config" ]
3423     if (is_win && is_asan) {
3424       remove_configs = [ "//build/config/sanitizers:default_sanitizer_flags" ]
3425     }
3426   }
3427 }
3428
3429 ###############################################################################
3430 # Public targets
3431 #
3432
3433 want_v8_shell =
3434     (current_toolchain == host_toolchain && v8_toolset_for_shell == "host") ||
3435     (current_toolchain == v8_snapshot_toolchain &&
3436      v8_toolset_for_shell == "host") ||
3437     (current_toolchain != host_toolchain && v8_toolset_for_shell == "target")
3438
3439 group("gn_all") {
3440   testonly = true
3441
3442   deps = [
3443     ":d8",
3444     ":v8_fuzzers",
3445     ":v8_hello_world",
3446     ":v8_sample_process",
3447     "test:gn_all",
3448     "tools:gn_all",
3449   ]
3450
3451   if (v8_custom_deps != "") {
3452     # Custom dependency from directory under v8/custom_deps.
3453     deps += [ v8_custom_deps ]
3454   }
3455
3456   if (want_v8_shell) {
3457     deps += [ ":v8_shell" ]
3458   }
3459 }
3460
3461 group("v8_clusterfuzz") {
3462   testonly = true
3463
3464   deps = [
3465     ":d8",
3466   ]
3467
3468   if (v8_multi_arch_build) {
3469     deps += [
3470       ":d8(//build/toolchain/linux:clang_x64)",
3471       ":d8(//build/toolchain/linux:clang_x64_v8_arm64)",
3472       ":d8(//build/toolchain/linux:clang_x86)",
3473       ":d8(//build/toolchain/linux:clang_x86_v8_arm)",
3474     ]
3475   }
3476 }
3477
3478 group("v8_archive") {
3479   testonly = true
3480
3481   deps = [
3482     ":d8",
3483   ]
3484
3485   if (!is_win) {
3486     # On windows, cctest doesn't link with v8_static_library.
3487     deps += [ "test/cctest:cctest" ]
3488   }
3489 }
3490
3491 # TODO(dglazkov): Remove the "!build_with_chromium" condition once this clause
3492 # is removed from Chromium.
3493 if (is_fuchsia && !build_with_chromium) {
3494   import("//build/config/fuchsia/rules.gni")
3495
3496   fuchsia_package("d8_fuchsia_pkg") {
3497     testonly = true
3498     binary = ":d8"
3499     package_name_override = "d8"
3500   }
3501
3502   fuchsia_package_runner("d8_fuchsia") {
3503     testonly = true
3504     package = ":d8_fuchsia_pkg"
3505     package_name_override = "d8"
3506   }
3507 }
3508
3509 group("v8_fuzzers") {
3510   testonly = true
3511   data_deps = [
3512     ":v8_simple_json_fuzzer",
3513     ":v8_simple_multi_return_fuzzer",
3514     ":v8_simple_parser_fuzzer",
3515     ":v8_simple_regexp_builtins_fuzzer",
3516     ":v8_simple_regexp_fuzzer",
3517     ":v8_simple_wasm_async_fuzzer",
3518     ":v8_simple_wasm_code_fuzzer",
3519     ":v8_simple_wasm_compile_fuzzer",
3520     ":v8_simple_wasm_fuzzer",
3521   ]
3522 }
3523
3524 if (is_component_build) {
3525   v8_component("v8") {
3526     sources = [
3527       "src/v8dll-main.cc",
3528     ]
3529
3530     public_deps = [
3531       ":v8_base",
3532       ":v8_maybe_snapshot",
3533     ]
3534
3535     configs = [ ":internal_config" ]
3536
3537     public_configs = [ ":external_config" ]
3538   }
3539
3540   v8_component("v8_for_testing") {
3541     testonly = true
3542
3543     sources = [
3544       "src/v8dll-main.cc",
3545     ]
3546
3547     public_deps = [
3548       ":torque_base",
3549       ":v8_base",
3550       ":v8_maybe_snapshot",
3551     ]
3552
3553     if (v8_use_snapshot) {
3554       public_deps += [ ":v8_initializers" ]
3555     }
3556
3557     configs = [ ":internal_config" ]
3558
3559     public_configs = [ ":external_config" ]
3560   }
3561 } else {
3562   group("v8") {
3563     public_deps = [
3564       ":v8_base",
3565       ":v8_maybe_snapshot",
3566     ]
3567
3568     public_configs = [ ":external_config" ]
3569   }
3570
3571   group("v8_for_testing") {
3572     testonly = true
3573
3574     public_deps = [
3575       ":torque_base",
3576       ":v8_base",
3577       ":v8_maybe_snapshot",
3578     ]
3579
3580     if (v8_use_snapshot) {
3581       public_deps += [ ":v8_initializers" ]
3582     }
3583
3584     public_configs = [ ":external_config" ]
3585   }
3586 }
3587
3588 v8_executable("d8") {
3589   sources = [
3590     "src/async-hooks-wrapper.cc",
3591     "src/async-hooks-wrapper.h",
3592     "src/d8-console.cc",
3593     "src/d8-console.h",
3594     "src/d8-js.cc",
3595     "src/d8-platforms.cc",
3596     "src/d8-platforms.h",
3597     "src/d8.cc",
3598     "src/d8.h",
3599   ]
3600
3601   configs = [
3602     # Note: don't use :internal_config here because this target will get
3603     # the :external_config applied to it by virtue of depending on :v8, and
3604     # you can't have both applied to the same target.
3605     ":internal_config_base",
3606   ]
3607
3608   deps = [
3609     ":v8",
3610     ":v8_libbase",
3611     ":v8_libplatform",
3612     "//build/win:default_exe_manifest",
3613   ]
3614
3615   if (is_posix || is_fuchsia) {
3616     sources += [ "src/d8-posix.cc" ]
3617   } else if (is_win) {
3618     sources += [ "src/d8-windows.cc" ]
3619   }
3620
3621   if (v8_correctness_fuzzer) {
3622     deps += [ "tools/clusterfuzz:v8_correctness_fuzzer_resources" ]
3623   }
3624
3625   defines = []
3626
3627   if (v8_enable_vtunejit) {
3628     deps += [ "src/third_party/vtune:v8_vtune" ]
3629   }
3630 }
3631
3632 v8_executable("v8_hello_world") {
3633   sources = [
3634     "samples/hello-world.cc",
3635   ]
3636
3637   configs = [
3638     # Note: don't use :internal_config here because this target will get
3639     # the :external_config applied to it by virtue of depending on :v8, and
3640     # you can't have both applied to the same target.
3641     ":internal_config_base",
3642   ]
3643
3644   deps = [
3645     ":v8",
3646     ":v8_libbase",
3647     ":v8_libplatform",
3648     "//build/win:default_exe_manifest",
3649   ]
3650 }
3651
3652 v8_executable("v8_sample_process") {
3653   sources = [
3654     "samples/process.cc",
3655   ]
3656
3657   configs = [
3658     # Note: don't use :internal_config here because this target will get
3659     # the :external_config applied to it by virtue of depending on :v8, and
3660     # you can't have both applied to the same target.
3661     ":internal_config_base",
3662   ]
3663
3664   deps = [
3665     ":v8",
3666     ":v8_libbase",
3667     ":v8_libplatform",
3668     "//build/win:default_exe_manifest",
3669   ]
3670 }
3671
3672 if (want_v8_shell) {
3673   v8_executable("v8_shell") {
3674     sources = [
3675       "samples/shell.cc",
3676     ]
3677
3678     configs = [
3679       # Note: don't use :internal_config here because this target will get
3680       # the :external_config applied to it by virtue of depending on :v8, and
3681       # you can't have both applied to the same target.
3682       ":internal_config_base",
3683     ]
3684
3685     deps = [
3686       ":v8",
3687       ":v8_libbase",
3688       ":v8_libplatform",
3689       "//build/win:default_exe_manifest",
3690     ]
3691   }
3692 }
3693
3694 template("v8_fuzzer") {
3695   name = target_name
3696   forward_variables_from(invoker, "*")
3697   v8_executable("v8_simple_" + name) {
3698     deps = [
3699       ":" + name,
3700       "//build/win:default_exe_manifest",
3701     ]
3702
3703     sources = [
3704       "test/fuzzer/fuzzer.cc",
3705     ]
3706
3707     configs = [ ":external_config" ]
3708   }
3709 }
3710
3711 v8_source_set("json_fuzzer") {
3712   sources = [
3713     "test/fuzzer/json.cc",
3714   ]
3715
3716   deps = [
3717     ":fuzzer_support",
3718   ]
3719
3720   configs = [
3721     ":external_config",
3722     ":internal_config_base",
3723   ]
3724 }
3725
3726 v8_fuzzer("json_fuzzer") {
3727 }
3728
3729 v8_source_set("multi_return_fuzzer") {
3730   sources = [
3731     "test/fuzzer/multi-return.cc",
3732   ]
3733
3734   deps = [
3735     ":fuzzer_support",
3736   ]
3737
3738   configs = [
3739     ":external_config",
3740     ":internal_config_base",
3741   ]
3742 }
3743
3744 v8_fuzzer("multi_return_fuzzer") {
3745 }
3746
3747 v8_source_set("parser_fuzzer") {
3748   sources = [
3749     "test/fuzzer/parser.cc",
3750   ]
3751
3752   deps = [
3753     ":fuzzer_support",
3754   ]
3755
3756   configs = [
3757     ":external_config",
3758     ":internal_config_base",
3759   ]
3760 }
3761
3762 v8_fuzzer("parser_fuzzer") {
3763 }
3764
3765 v8_source_set("regexp_builtins_fuzzer") {
3766   sources = [
3767     "test/fuzzer/regexp-builtins.cc",
3768     "test/fuzzer/regexp_builtins/mjsunit.js.h",
3769   ]
3770
3771   deps = [
3772     ":fuzzer_support",
3773   ]
3774
3775   configs = [
3776     ":external_config",
3777     ":internal_config_base",
3778   ]
3779 }
3780
3781 v8_fuzzer("regexp_builtins_fuzzer") {
3782 }
3783
3784 v8_source_set("regexp_fuzzer") {
3785   sources = [
3786     "test/fuzzer/regexp.cc",
3787   ]
3788
3789   deps = [
3790     ":fuzzer_support",
3791   ]
3792
3793   configs = [
3794     ":external_config",
3795     ":internal_config_base",
3796   ]
3797 }
3798
3799 v8_fuzzer("regexp_fuzzer") {
3800 }
3801
3802 v8_source_set("wasm_module_runner") {
3803   sources = [
3804     "test/common/wasm/wasm-module-runner.cc",
3805     "test/common/wasm/wasm-module-runner.h",
3806   ]
3807
3808   deps = [
3809     ":generate_bytecode_builtins_list",
3810     ":run_torque",
3811   ]
3812
3813   if (v8_enable_i18n_support) {
3814     public_deps = [
3815       "//third_party/icu",
3816     ]
3817   }
3818
3819   configs = [
3820     ":external_config",
3821     ":internal_config_base",
3822   ]
3823 }
3824
3825 v8_source_set("wasm_fuzzer") {
3826   sources = [
3827     "test/fuzzer/wasm.cc",
3828   ]
3829
3830   deps = [
3831     ":fuzzer_support",
3832     ":lib_wasm_fuzzer_common",
3833     ":wasm_module_runner",
3834   ]
3835
3836   configs = [
3837     ":external_config",
3838     ":internal_config_base",
3839   ]
3840 }
3841
3842 v8_fuzzer("wasm_fuzzer") {
3843 }
3844
3845 v8_source_set("wasm_async_fuzzer") {
3846   sources = [
3847     "test/fuzzer/wasm-async.cc",
3848   ]
3849
3850   deps = [
3851     ":fuzzer_support",
3852     ":lib_wasm_fuzzer_common",
3853     ":wasm_module_runner",
3854   ]
3855
3856   configs = [
3857     ":external_config",
3858     ":internal_config_base",
3859   ]
3860 }
3861
3862 v8_fuzzer("wasm_async_fuzzer") {
3863 }
3864
3865 v8_source_set("wasm_code_fuzzer") {
3866   sources = [
3867     "test/common/wasm/test-signatures.h",
3868     "test/fuzzer/wasm-code.cc",
3869   ]
3870
3871   deps = [
3872     ":fuzzer_support",
3873     ":lib_wasm_fuzzer_common",
3874     ":wasm_module_runner",
3875   ]
3876
3877   configs = [
3878     ":external_config",
3879     ":internal_config_base",
3880   ]
3881 }
3882
3883 v8_fuzzer("wasm_code_fuzzer") {
3884 }
3885
3886 v8_source_set("lib_wasm_fuzzer_common") {
3887   sources = [
3888     "test/fuzzer/wasm-fuzzer-common.cc",
3889     "test/fuzzer/wasm-fuzzer-common.h",
3890   ]
3891
3892   deps = [
3893     ":generate_bytecode_builtins_list",
3894     ":run_torque",
3895   ]
3896
3897   if (v8_enable_i18n_support) {
3898     public_deps = [
3899       "//third_party/icu",
3900     ]
3901   }
3902
3903   configs = [
3904     ":external_config",
3905     ":internal_config_base",
3906   ]
3907 }
3908
3909 v8_source_set("wasm_compile_fuzzer") {
3910   sources = [
3911     "test/common/wasm/test-signatures.h",
3912     "test/fuzzer/wasm-compile.cc",
3913   ]
3914
3915   deps = [
3916     ":fuzzer_support",
3917     ":lib_wasm_fuzzer_common",
3918     ":wasm_module_runner",
3919   ]
3920
3921   configs = [
3922     ":external_config",
3923     ":internal_config_base",
3924   ]
3925 }
3926
3927 v8_fuzzer("wasm_compile_fuzzer") {
3928 }
3929
3930 # Target to build all generated .cc files.
3931 group("v8_generated_cc_files") {
3932   testonly = true
3933
3934   deps = [
3935     ":generate_bytecode_builtins_list",
3936     ":js2c_extras",
3937     ":run_torque",
3938     "src/inspector:v8_generated_cc_files",
3939     "test/cctest:v8_generated_cc_files",
3940   ]
3941 }