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