• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
5import("//build/config/android/config.gni")
6import("//build/config/arm.gni")
7import("//build/config/dcheck_always_on.gni")
8import("//build/config/mips.gni")
9import("//build/config/sanitizers/sanitizers.gni")
10
11if (is_android) {
12  import("//build/config/android/rules.gni")
13}
14
15import("gni/v8.gni")
16import("gni/isolate.gni")
17import("snapshot_toolchain.gni")
18
19declare_args() {
20  # Print to stdout on Android.
21  v8_android_log_stdout = false
22
23  # Sets -DVERIFY_HEAP.
24  v8_enable_verify_heap = ""
25
26  # Sets -DVERIFY_PREDICTABLE
27  v8_enable_verify_predictable = false
28
29  # Enable compiler warnings when using V8_DEPRECATED apis.
30  v8_deprecation_warnings = false
31
32  # Enable compiler warnings when using V8_DEPRECATE_SOON apis.
33  v8_imminent_deprecation_warnings = false
34
35  # Embeds the given script into the snapshot.
36  v8_embed_script = ""
37
38  # Sets -dENABLE_DISASSEMBLER.
39  v8_enable_disassembler = ""
40
41  # Sets -dENABLE_GDB_JIT_INTERFACE.
42  v8_enable_gdbjit = ""
43
44  # Sets -dENABLE_VTUNE_JIT_INTERFACE.
45  v8_enable_vtunejit = false
46
47  # Sets -dENABLE_HANDLE_ZAPPING.
48  v8_enable_handle_zapping = is_debug
49
50  # Enable slow dchecks.
51  v8_enable_slow_dchecks = false
52
53  # Enable code-generation-time checking of types in the CodeStubAssembler.
54  v8_enable_verify_csa = false
55
56  # Interpreted regexp engine exists as platform-independent alternative
57  # based where the regular expression is compiled to a bytecode.
58  v8_interpreted_regexp = false
59
60  # Sets -dOBJECT_PRINT.
61  v8_enable_object_print = ""
62
63  # Sets -dTRACE_MAPS.
64  v8_enable_trace_maps = ""
65
66  # Sets -dV8_ENABLE_CHECKS.
67  v8_enable_v8_checks = ""
68
69  # With post mortem support enabled, metadata is embedded into libv8 that
70  # describes various parameters of the VM for use by debuggers. See
71  # tools/gen-postmortem-metadata.py for details.
72  v8_postmortem_support = false
73
74  # Switches off inlining in V8.
75  v8_no_inline = false
76
77  # Override OS page size when generating snapshot
78  v8_os_page_size = "0"
79
80  # Similar to vfp but on MIPS.
81  v8_can_use_fpu_instructions = true
82
83  # Similar to the ARM hard float ABI but on MIPS.
84  v8_use_mips_abi_hardfloat = true
85
86  # List of extra files to snapshot. They will be snapshotted in order so
87  # if files export symbols used by later files, they should go first.
88  #
89  # This default is used by cctests. Projects using V8 will want to override.
90  v8_extra_library_files = [ "//test/cctest/test-extra.js" ]
91
92  # Like v8_extra_library_files but for experimental features.
93  #
94  # This default is used by cctests. Projects using V8 will want to override.
95  v8_experimental_extra_library_files =
96      [ "//test/cctest/test-experimental-extra.js" ]
97
98  v8_enable_gdbjit = ((v8_current_cpu == "x86" || v8_current_cpu == "x64" ||
99                       v8_current_cpu == "x87") && (is_linux || is_mac)) ||
100                     (v8_current_cpu == "ppc64" && is_linux)
101}
102
103# Derived defaults.
104if (v8_enable_verify_heap == "") {
105  v8_enable_verify_heap = is_debug
106}
107if (v8_enable_object_print == "") {
108  v8_enable_object_print = is_debug
109}
110if (v8_enable_disassembler == "") {
111  v8_enable_disassembler = is_debug
112}
113if (v8_enable_trace_maps == "") {
114  v8_enable_trace_maps = is_debug
115}
116if (v8_enable_v8_checks == "") {
117  v8_enable_v8_checks = is_debug
118}
119
120# Specifies if the target build is a simulator build. Comparing target cpu
121# with v8 target cpu to not affect simulator builds for making cross-compile
122# snapshots.
123is_target_simulator = target_cpu != v8_target_cpu
124
125v8_generated_peephole_source = "$target_gen_dir/bytecode-peephole-table.cc"
126v8_random_seed = "314159265"
127v8_toolset_for_shell = "host"
128
129###############################################################################
130# Configurations
131#
132config("internal_config") {
133  visibility = [ ":*" ]  # Only targets in this file can depend on this.
134
135  include_dirs = [ "." ]
136
137  if (is_component_build) {
138    defines = [ "BUILDING_V8_SHARED" ]
139  }
140}
141
142config("internal_config_base") {
143  visibility = [ ":*" ]  # Only targets in this file can depend on this.
144
145  include_dirs = [ "." ]
146}
147
148# This config should be applied to code using the libplatform.
149config("libplatform_config") {
150  include_dirs = [ "include" ]
151  if (is_component_build) {
152    defines = [ "USING_V8_PLATFORM_SHARED" ]
153  }
154}
155
156# This config should be applied to code using the libbase.
157config("libbase_config") {
158  if (is_component_build) {
159    defines = [ "USING_V8_BASE_SHARED" ]
160  }
161  libs = []
162  if (is_android && current_toolchain != host_toolchain) {
163    libs += [ "log" ]
164  }
165}
166
167# This config should be applied to code using the libsampler.
168config("libsampler_config") {
169  include_dirs = [ "include" ]
170}
171
172# This config should only be applied to code using V8 and not any V8 code
173# itself.
174config("external_config") {
175  if (is_component_build) {
176    defines = [ "USING_V8_SHARED" ]
177  }
178  include_dirs = [ "include" ]
179  if (v8_enable_inspector) {
180    include_dirs += [ "$target_gen_dir/include" ]
181  }
182}
183
184# This config should only be applied to code that needs to be explicitly
185# aware of whether we are using startup data or not.
186config("external_startup_data") {
187  if (v8_use_external_startup_data) {
188    defines = [ "V8_USE_EXTERNAL_STARTUP_DATA" ]
189  }
190}
191
192config("features") {
193  visibility = [ ":*" ]  # Only targets in this file can depend on this.
194
195  defines = []
196
197  if (v8_enable_disassembler) {
198    defines += [ "ENABLE_DISASSEMBLER" ]
199  }
200  if (v8_enable_gdbjit) {
201    defines += [ "ENABLE_GDB_JIT_INTERFACE" ]
202  }
203  if (v8_enable_vtunejit) {
204    defines += [ "ENABLE_VTUNE_JIT_INTERFACE" ]
205  }
206  if (v8_enable_object_print) {
207    defines += [ "OBJECT_PRINT" ]
208  }
209  if (v8_enable_verify_heap) {
210    defines += [ "VERIFY_HEAP" ]
211  }
212  if (v8_enable_verify_predictable) {
213    defines += [ "VERIFY_PREDICTABLE" ]
214  }
215  if (v8_enable_trace_maps) {
216    defines += [ "TRACE_MAPS" ]
217  }
218  if (v8_enable_v8_checks) {
219    defines += [ "V8_ENABLE_CHECKS" ]
220  }
221  if (v8_interpreted_regexp) {
222    defines += [ "V8_INTERPRETED_REGEXP" ]
223  }
224  if (v8_deprecation_warnings) {
225    defines += [ "V8_DEPRECATION_WARNINGS" ]
226  }
227  if (v8_imminent_deprecation_warnings) {
228    defines += [ "V8_IMMINENT_DEPRECATION_WARNINGS" ]
229  }
230  if (v8_enable_i18n_support) {
231    defines += [ "V8_I18N_SUPPORT" ]
232  }
233  if (v8_enable_handle_zapping) {
234    defines += [ "ENABLE_HANDLE_ZAPPING" ]
235  }
236  if (v8_use_external_startup_data) {
237    defines += [ "V8_USE_EXTERNAL_STARTUP_DATA" ]
238  }
239}
240
241config("toolchain") {
242  visibility = [ ":*" ]  # Only targets in this file can depend on this.
243
244  defines = []
245  cflags = []
246  ldflags = []
247
248  if (v8_current_cpu == "arm") {
249    defines += [ "V8_TARGET_ARCH_ARM" ]
250    if (arm_version >= 7) {
251      defines += [ "CAN_USE_ARMV7_INSTRUCTIONS" ]
252    }
253    if (arm_fpu == "vfpv3-d16") {
254      defines += [ "CAN_USE_VFP3_INSTRUCTIONS" ]
255    } else if (arm_fpu == "vfpv3") {
256      defines += [
257        "CAN_USE_VFP3_INSTRUCTIONS",
258        "CAN_USE_VFP32DREGS",
259      ]
260    } else if (arm_fpu == "neon") {
261      defines += [
262        "CAN_USE_VFP3_INSTRUCTIONS",
263        "CAN_USE_VFP32DREGS",
264        "CAN_USE_NEON",
265      ]
266    }
267
268    # TODO(jochen): Add support for arm_test_noprobe.
269
270    if (current_cpu != "arm") {
271      # These defines ares used for the ARM simulator.
272      if (arm_float_abi == "hard") {
273        defines += [ "USE_EABI_HARDFLOAT=1" ]
274      } else if (arm_float_abi == "softfp") {
275        defines += [ "USE_EABI_HARDFLOAT=0" ]
276      }
277    }
278  }
279  if (v8_current_cpu == "arm64") {
280    defines += [ "V8_TARGET_ARCH_ARM64" ]
281  }
282
283  # Mips64el/mipsel simulators.
284  if (is_target_simulator &&
285      (v8_current_cpu == "mipsel" || v8_current_cpu == "mips64el")) {
286    defines += [ "_MIPS_TARGET_SIMULATOR" ]
287  }
288
289  # TODO(jochen): Add support for mips.
290  if (v8_current_cpu == "mipsel") {
291    defines += [ "V8_TARGET_ARCH_MIPS" ]
292    if (v8_can_use_fpu_instructions) {
293      defines += [ "CAN_USE_FPU_INSTRUCTIONS" ]
294    }
295    if (v8_use_mips_abi_hardfloat) {
296      defines += [
297        "__mips_hard_float=1",
298        "CAN_USE_FPU_INSTRUCTIONS",
299      ]
300    } else {
301      defines += [ "__mips_soft_float=1" ]
302    }
303    if (mips_arch_variant == "r6") {
304      defines += [
305        "_MIPS_ARCH_MIPS32R6",
306        "FPU_MODE_FP64",
307      ]
308    } else if (mips_arch_variant == "r2") {
309      defines += [ "_MIPS_ARCH_MIPS32R2" ]
310      if (mips_fpu_mode == "fp64") {
311        defines += [ "FPU_MODE_FP64" ]
312      } else if (mips_fpu_mode == "fpxx") {
313        defines += [ "FPU_MODE_FPXX" ]
314      } else if (mips_fpu_mode == "fp32") {
315        defines += [ "FPU_MODE_FP32" ]
316      }
317    } else if (mips_arch_variant == "r1") {
318      defines += [ "FPU_MODE_FP32" ]
319    }
320
321    # TODO(jochen): Add support for mips_arch_variant rx and loongson.
322  }
323
324  # TODO(jochen): Add support for mips64.
325  if (v8_current_cpu == "mips64el") {
326    defines += [ "V8_TARGET_ARCH_MIPS64" ]
327    if (v8_can_use_fpu_instructions) {
328      defines += [ "CAN_USE_FPU_INSTRUCTIONS" ]
329    }
330
331    # TODO(jochen): Add support for big endian host byteorder.
332    defines += [ "V8_TARGET_ARCH_MIPS64_LE" ]
333    if (v8_use_mips_abi_hardfloat) {
334      defines += [
335        "__mips_hard_float=1",
336        "CAN_USE_FPU_INSTRUCTIONS",
337      ]
338    } else {
339      defines += [ "__mips_soft_float=1" ]
340    }
341    if (mips_arch_variant == "r6") {
342      defines += [ "_MIPS_ARCH_MIPS64R6" ]
343    } else if (mips_arch_variant == "r2") {
344      defines += [ "_MIPS_ARCH_MIPS64R2" ]
345    }
346  }
347  if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") {
348    defines += [ "V8_TARGET_ARCH_S390" ]
349    if (v8_current_cpu == "s390x") {
350      defines += [ "V8_TARGET_ARCH_S390X" ]
351    }
352    if (host_cpu == "x64" || host_cpu == "x86") {
353      defines += [ "V8_TARGET_ARCH_S390_LE_SIM" ]
354    }
355  }
356  if (v8_current_cpu == "x86") {
357    defines += [ "V8_TARGET_ARCH_IA32" ]
358    if (is_win) {
359      # Ensure no surprising artifacts from 80bit double math with x86.
360      cflags += [ "/arch:SSE2" ]
361    }
362  }
363  if (v8_current_cpu == "x64") {
364    defines += [ "V8_TARGET_ARCH_X64" ]
365    if (is_win) {
366      # Increase the initial stack size. The default is 1MB, this is 2MB. This
367      # applies only to executables and shared libraries produced by V8 since
368      # ldflags are not pushed to dependants.
369      ldflags += [ "/STACK:2097152" ]
370    }
371  }
372  if (is_android && v8_android_log_stdout) {
373    defines += [ "V8_ANDROID_LOG_STDOUT" ]
374  }
375
376  # TODO(jochen): Support v8_enable_prof on Windows.
377  # TODO(jochen): Add support for compiling with simulators.
378
379  if (is_debug) {
380    if (is_linux && v8_enable_backtrace) {
381      ldflags += [ "-rdynamic" ]
382    }
383
384    defines += [ "DEBUG" ]
385    if (v8_enable_slow_dchecks) {
386      defines += [ "ENABLE_SLOW_DCHECKS" ]
387    }
388  } else if (dcheck_always_on) {
389    defines += [ "DEBUG" ]
390  }
391
392  if (v8_enable_verify_csa) {
393    defines += [ "ENABLE_VERIFY_CSA" ]
394  }
395
396  if (v8_no_inline) {
397    cflags += [
398      "-fno-inline-functions",
399      "-fno-inline",
400    ]
401  }
402
403  if (is_clang) {
404    cflags += [
405      "-Wsign-compare",
406
407      # TODO(hans): Remove once http://crbug.com/428099 is resolved.
408      "-Winconsistent-missing-override",
409    ]
410    #if (v8_current_cpu == "x64" || v8_current_cpu == "arm64" ||
411    #    v8_current_cpu == "mips64el") {
412    #  cflags += [ "-Wshorten-64-to-32" ]
413    #}
414  }
415}
416
417###############################################################################
418# Actions
419#
420
421action("js2c") {
422  visibility = [ ":*" ]  # Only targets in this file can depend on this.
423
424  script = "tools/js2c.py"
425
426  # The script depends on this other script, this rule causes a rebuild if it
427  # changes.
428  inputs = [
429    "tools/jsmin.py",
430  ]
431
432  # NOSORT
433  sources = [
434    "src/js/macros.py",
435    "src/messages.h",
436    "src/js/prologue.js",
437    "src/js/runtime.js",
438    "src/js/v8natives.js",
439    "src/js/array.js",
440    "src/js/string.js",
441    "src/js/arraybuffer.js",
442    "src/js/typedarray.js",
443    "src/js/collection.js",
444    "src/js/weak-collection.js",
445    "src/js/collection-iterator.js",
446    "src/js/promise.js",
447    "src/js/messages.js",
448    "src/js/templates.js",
449    "src/js/spread.js",
450    "src/js/proxy.js",
451    "src/js/harmony-string-padding.js",
452    "src/debug/mirrors.js",
453    "src/debug/debug.js",
454    "src/debug/liveedit.js",
455  ]
456
457  outputs = [
458    "$target_gen_dir/libraries.cc",
459  ]
460
461  if (v8_enable_i18n_support) {
462    sources += [ "src/js/i18n.js" ]
463  }
464
465  args = [
466           rebase_path("$target_gen_dir/libraries.cc", root_build_dir),
467           "CORE",
468         ] + rebase_path(sources, root_build_dir)
469
470  if (v8_use_external_startup_data) {
471    outputs += [ "$target_gen_dir/libraries.bin" ]
472    args += [
473      "--startup_blob",
474      rebase_path("$target_gen_dir/libraries.bin", root_build_dir),
475    ]
476  }
477}
478
479action("js2c_experimental") {
480  visibility = [ ":*" ]  # Only targets in this file can depend on this.
481
482  script = "tools/js2c.py"
483
484  # The script depends on this other script, this rule causes a rebuild if it
485  # changes.
486  inputs = [
487    "tools/jsmin.py",
488  ]
489
490  # NOSORT
491  sources = [
492    "src/js/macros.py",
493    "src/messages.h",
494    "src/js/harmony-atomics.js",
495  ]
496
497  outputs = [
498    "$target_gen_dir/experimental-libraries.cc",
499  ]
500
501  args = [
502           rebase_path("$target_gen_dir/experimental-libraries.cc",
503                       root_build_dir),
504           "EXPERIMENTAL",
505         ] + rebase_path(sources, root_build_dir)
506
507  if (v8_use_external_startup_data) {
508    outputs += [ "$target_gen_dir/libraries_experimental.bin" ]
509    args += [
510      "--startup_blob",
511      rebase_path("$target_gen_dir/libraries_experimental.bin", root_build_dir),
512    ]
513  }
514}
515
516action("js2c_extras") {
517  visibility = [ ":*" ]  # Only targets in this file can depend on this.
518
519  script = "tools/js2c.py"
520
521  # The script depends on this other script, this rule causes a rebuild if it
522  # changes.
523  inputs = [
524    "tools/jsmin.py",
525  ]
526
527  sources = v8_extra_library_files
528
529  outputs = [
530    "$target_gen_dir/extras-libraries.cc",
531  ]
532
533  args = [
534           rebase_path("$target_gen_dir/extras-libraries.cc", root_build_dir),
535           "EXTRAS",
536         ] + rebase_path(sources, root_build_dir)
537
538  if (v8_use_external_startup_data) {
539    outputs += [ "$target_gen_dir/libraries_extras.bin" ]
540    args += [
541      "--startup_blob",
542      rebase_path("$target_gen_dir/libraries_extras.bin", root_build_dir),
543    ]
544  }
545}
546
547action("js2c_experimental_extras") {
548  visibility = [ ":*" ]  # Only targets in this file can depend on this.
549
550  script = "tools/js2c.py"
551
552  # The script depends on this other script, this rule causes a rebuild if it
553  # changes.
554  inputs = [
555    "tools/jsmin.py",
556  ]
557
558  sources = v8_experimental_extra_library_files
559
560  outputs = [
561    "$target_gen_dir/experimental-extras-libraries.cc",
562  ]
563
564  args = [
565           rebase_path("$target_gen_dir/experimental-extras-libraries.cc",
566                       root_build_dir),
567           "EXPERIMENTAL_EXTRAS",
568         ] + rebase_path(sources, root_build_dir)
569
570  if (v8_use_external_startup_data) {
571    outputs += [ "$target_gen_dir/libraries_experimental_extras.bin" ]
572    args += [
573      "--startup_blob",
574      rebase_path("$target_gen_dir/libraries_experimental_extras.bin",
575                  root_build_dir),
576    ]
577  }
578}
579
580action("d8_js2c") {
581  visibility = [ ":*" ]  # Only targets in this file can depend on this.
582
583  script = "tools/js2c.py"
584
585  # NOSORT
586  inputs = [
587    "src/d8.js",
588    "src/js/macros.py",
589  ]
590
591  outputs = [
592    "$target_gen_dir/d8-js.cc",
593  ]
594
595  args = rebase_path(outputs, root_build_dir) + [ "D8" ] +
596         rebase_path(inputs, root_build_dir)
597}
598
599if (is_android && enable_java_templates) {
600  android_assets("v8_external_startup_data_assets") {
601    if (v8_use_external_startup_data) {
602      deps = [
603        "//v8",
604      ]
605      sources = [
606        "$root_out_dir/natives_blob.bin",
607      ]
608      renaming_sources = [ "$root_out_dir/snapshot_blob.bin" ]
609      if (current_cpu == "arm" || current_cpu == "x86" ||
610          current_cpu == "mipsel") {
611        renaming_destinations = [ "snapshot_blob_32.bin" ]
612      } else {
613        renaming_destinations = [ "snapshot_blob_64.bin" ]
614      }
615      disable_compression = true
616    }
617  }
618}
619
620if (v8_use_external_startup_data) {
621  action("natives_blob") {
622    visibility = [ ":*" ]  # Only targets in this file can depend on this.
623
624    deps = [
625      ":js2c",
626      ":js2c_experimental",
627      ":js2c_experimental_extras",
628      ":js2c_extras",
629    ]
630
631    # NOSORT
632    sources = [
633      "$target_gen_dir/libraries.bin",
634      "$target_gen_dir/libraries_experimental.bin",
635      "$target_gen_dir/libraries_extras.bin",
636      "$target_gen_dir/libraries_experimental_extras.bin",
637    ]
638
639    outputs = [
640      "$root_out_dir/natives_blob.bin",
641    ]
642
643    script = "tools/concatenate-files.py"
644
645    args = rebase_path(sources + outputs, root_build_dir)
646  }
647}
648
649action("postmortem-metadata") {
650  # Only targets in this file and the top-level visibility target can
651  # depend on this.
652  visibility = [
653    ":*",
654    "//:gn_visibility",
655  ]
656
657  script = "tools/gen-postmortem-metadata.py"
658
659  # NOSORT
660  sources = [
661    "src/objects.h",
662    "src/objects-inl.h",
663  ]
664
665  outputs = [
666    "$target_gen_dir/debug-support.cc",
667  ]
668
669  args = rebase_path(outputs, root_build_dir) +
670         rebase_path(sources, root_build_dir)
671}
672
673action("run_mksnapshot") {
674  visibility = [ ":*" ]  # Only targets in this file can depend on this.
675
676  deps = [
677    ":mksnapshot($v8_snapshot_toolchain)",
678  ]
679
680  script = "tools/run.py"
681
682  sources = []
683
684  outputs = [
685    "$target_gen_dir/snapshot.cc",
686  ]
687
688  args = [
689    "./" + rebase_path(get_label_info(":mksnapshot($v8_snapshot_toolchain)",
690                                      "root_out_dir") + "/mksnapshot",
691                       root_build_dir),
692    "--startup_src",
693    rebase_path("$target_gen_dir/snapshot.cc", root_build_dir),
694  ]
695
696  if (v8_random_seed != "0") {
697    args += [
698      "--random-seed",
699      v8_random_seed,
700    ]
701  }
702
703  if (v8_os_page_size != "0") {
704    args += [
705      "--v8_os_page_size",
706      v8_os_page_size,
707    ]
708  }
709
710  if (v8_use_external_startup_data) {
711    outputs += [ "$root_out_dir/snapshot_blob.bin" ]
712    args += [
713      "--startup_blob",
714      rebase_path("$root_out_dir/snapshot_blob.bin", root_build_dir),
715    ]
716  }
717
718  if (v8_embed_script != "") {
719    sources += [ v8_embed_script ]
720    args += [ rebase_path(v8_embed_script, root_build_dir) ]
721  }
722}
723
724action("run_mkpeephole") {
725  visibility = [ ":*" ]  # Only targets in this file can depend on this.
726
727  deps = [
728    ":mkpeephole($v8_snapshot_toolchain)",
729  ]
730
731  outputs = [
732    v8_generated_peephole_source,
733  ]
734
735  sources = []
736
737  script = "tools/run.py"
738
739  args = [
740    "./" + rebase_path(get_label_info(":mkpeephole($v8_snapshot_toolchain)",
741                                      "root_out_dir") + "/mkpeephole",
742                       root_build_dir),
743    rebase_path(v8_generated_peephole_source, root_build_dir),
744  ]
745}
746
747action("v8_dump_build_config") {
748  script = "tools/testrunner/utils/dump_build_config.py"
749  outputs = [
750    "$root_out_dir/v8_build_config.json",
751  ]
752  args = [
753    rebase_path("$root_out_dir/v8_build_config.json", root_build_dir),
754    "current_cpu=\"$current_cpu\"",
755    "dcheck_always_on=$dcheck_always_on",
756    "is_asan=$is_asan",
757    "is_cfi=$is_cfi",
758    "is_component_build=$is_component_build",
759    "is_debug=$is_debug",
760    "is_msan=$is_msan",
761    "is_tsan=$is_tsan",
762    "target_cpu=\"$target_cpu\"",
763    "v8_current_cpu=\"$v8_current_cpu\"",
764    "v8_enable_i18n_support=$v8_enable_i18n_support",
765    "v8_enable_inspector=$v8_enable_inspector",
766    "v8_target_cpu=\"$v8_target_cpu\"",
767    "v8_use_snapshot=$v8_use_snapshot",
768  ]
769}
770
771###############################################################################
772# Source Sets (aka static libraries)
773#
774
775source_set("v8_maybe_snapshot") {
776  if (v8_use_snapshot && v8_use_external_startup_data) {
777    public_deps = [
778      ":v8_external_snapshot",
779    ]
780  } else if (v8_use_snapshot) {
781    public_deps = [
782      ":v8_snapshot",
783    ]
784  } else {
785    # Ignore v8_use_external_startup_data setting if no snapshot is used.
786    public_deps = [
787      ":v8_nosnapshot",
788    ]
789  }
790}
791
792v8_source_set("v8_nosnapshot") {
793  visibility = [ ":*" ]  # Only targets in this file can depend on this.
794
795  deps = [
796    ":js2c",
797    ":js2c_experimental",
798    ":js2c_experimental_extras",
799    ":js2c_extras",
800    ":v8_base",
801  ]
802
803  sources = [
804    "$target_gen_dir/experimental-extras-libraries.cc",
805    "$target_gen_dir/experimental-libraries.cc",
806    "$target_gen_dir/extras-libraries.cc",
807    "$target_gen_dir/libraries.cc",
808    "src/snapshot/snapshot-empty.cc",
809  ]
810
811  configs = [ ":internal_config" ]
812}
813
814v8_source_set("v8_snapshot") {
815  # Only targets in this file and the top-level visibility target can
816  # depend on this.
817  visibility = [
818    ":*",
819    "//:gn_visibility",
820  ]
821
822  deps = [
823    ":js2c",
824    ":js2c_experimental",
825    ":js2c_experimental_extras",
826    ":js2c_extras",
827    ":v8_base",
828  ]
829  public_deps = [
830    # This should be public so downstream targets can declare the snapshot
831    # output file as their inputs.
832    ":run_mksnapshot",
833  ]
834
835  sources = [
836    "$target_gen_dir/experimental-extras-libraries.cc",
837    "$target_gen_dir/experimental-libraries.cc",
838    "$target_gen_dir/extras-libraries.cc",
839    "$target_gen_dir/libraries.cc",
840    "$target_gen_dir/snapshot.cc",
841  ]
842
843  configs = [ ":internal_config" ]
844}
845
846if (v8_use_external_startup_data) {
847  v8_source_set("v8_external_snapshot") {
848    visibility = [ ":*" ]  # Only targets in this file can depend on this.
849
850    deps = [
851      ":js2c",
852      ":js2c_experimental",
853      ":js2c_experimental_extras",
854      ":js2c_extras",
855      ":v8_base",
856    ]
857    public_deps = [
858      ":natives_blob",
859      ":run_mksnapshot",
860    ]
861
862    sources = [
863      "src/snapshot/natives-external.cc",
864      "src/snapshot/snapshot-external.cc",
865    ]
866
867    configs = [ ":internal_config" ]
868  }
869}
870
871# This is split out to be a non-code containing target that the Chromium browser
872# DLL can depend upon to get only a version string.
873v8_header_set("v8_version") {
874  configs = [ ":internal_config" ]
875
876  sources = [
877    "include/v8-version-string.h",
878    "include/v8-version.h",
879  ]
880}
881
882v8_source_set("v8_base") {
883  visibility = [ ":*" ]  # Only targets in this file can depend on this.
884
885  sources = [
886    "//base/trace_event/common/trace_event_common.h",
887
888    ### gcmole(all) ###
889    "include/v8-debug.h",
890    "include/v8-experimental.h",
891    "include/v8-platform.h",
892    "include/v8-profiler.h",
893    "include/v8-testing.h",
894    "include/v8-util.h",
895    "include/v8.h",
896    "include/v8config.h",
897    "src/accessors.cc",
898    "src/accessors.h",
899    "src/address-map.cc",
900    "src/address-map.h",
901    "src/allocation-site-scopes.cc",
902    "src/allocation-site-scopes.h",
903    "src/allocation.cc",
904    "src/allocation.h",
905    "src/api-arguments-inl.h",
906    "src/api-arguments.cc",
907    "src/api-arguments.h",
908    "src/api-experimental.cc",
909    "src/api-experimental.h",
910    "src/api-natives.cc",
911    "src/api-natives.h",
912    "src/api.cc",
913    "src/api.h",
914    "src/arguments.cc",
915    "src/arguments.h",
916    "src/asmjs/asm-js.cc",
917    "src/asmjs/asm-js.h",
918    "src/asmjs/asm-typer.cc",
919    "src/asmjs/asm-typer.h",
920    "src/asmjs/asm-types.cc",
921    "src/asmjs/asm-types.h",
922    "src/asmjs/asm-wasm-builder.cc",
923    "src/asmjs/asm-wasm-builder.h",
924    "src/asmjs/switch-logic.cc",
925    "src/asmjs/switch-logic.h",
926    "src/assembler-inl.h",
927    "src/assembler.cc",
928    "src/assembler.h",
929    "src/assert-scope.cc",
930    "src/assert-scope.h",
931    "src/ast/ast-expression-rewriter.cc",
932    "src/ast/ast-expression-rewriter.h",
933    "src/ast/ast-function-literal-id-reindexer.cc",
934    "src/ast/ast-function-literal-id-reindexer.h",
935    "src/ast/ast-numbering.cc",
936    "src/ast/ast-numbering.h",
937    "src/ast/ast-traversal-visitor.h",
938    "src/ast/ast-type-bounds.h",
939    "src/ast/ast-types.cc",
940    "src/ast/ast-types.h",
941    "src/ast/ast-value-factory.cc",
942    "src/ast/ast-value-factory.h",
943    "src/ast/ast.cc",
944    "src/ast/ast.h",
945    "src/ast/compile-time-value.cc",
946    "src/ast/compile-time-value.h",
947    "src/ast/context-slot-cache.cc",
948    "src/ast/context-slot-cache.h",
949    "src/ast/modules.cc",
950    "src/ast/modules.h",
951    "src/ast/prettyprinter.cc",
952    "src/ast/prettyprinter.h",
953    "src/ast/scopes.cc",
954    "src/ast/scopes.h",
955    "src/ast/variables.cc",
956    "src/ast/variables.h",
957    "src/background-parsing-task.cc",
958    "src/background-parsing-task.h",
959    "src/bailout-reason.cc",
960    "src/bailout-reason.h",
961    "src/basic-block-profiler.cc",
962    "src/basic-block-profiler.h",
963    "src/bignum-dtoa.cc",
964    "src/bignum-dtoa.h",
965    "src/bignum.cc",
966    "src/bignum.h",
967    "src/bit-vector.cc",
968    "src/bit-vector.h",
969    "src/bootstrapper.cc",
970    "src/bootstrapper.h",
971    "src/builtins/builtins-api.cc",
972    "src/builtins/builtins-arguments.cc",
973    "src/builtins/builtins-arguments.h",
974    "src/builtins/builtins-array.cc",
975    "src/builtins/builtins-arraybuffer.cc",
976    "src/builtins/builtins-async-function.cc",
977    "src/builtins/builtins-async-iterator.cc",
978    "src/builtins/builtins-async.cc",
979    "src/builtins/builtins-async.h",
980    "src/builtins/builtins-boolean.cc",
981    "src/builtins/builtins-call.cc",
982    "src/builtins/builtins-callsite.cc",
983    "src/builtins/builtins-constructor.cc",
984    "src/builtins/builtins-constructor.h",
985    "src/builtins/builtins-conversion.cc",
986    "src/builtins/builtins-dataview.cc",
987    "src/builtins/builtins-date.cc",
988    "src/builtins/builtins-debug.cc",
989    "src/builtins/builtins-error.cc",
990    "src/builtins/builtins-function.cc",
991    "src/builtins/builtins-generator.cc",
992    "src/builtins/builtins-global.cc",
993    "src/builtins/builtins-handler.cc",
994    "src/builtins/builtins-ic.cc",
995    "src/builtins/builtins-internal.cc",
996    "src/builtins/builtins-interpreter.cc",
997    "src/builtins/builtins-json.cc",
998    "src/builtins/builtins-math.cc",
999    "src/builtins/builtins-number.cc",
1000    "src/builtins/builtins-object.cc",
1001    "src/builtins/builtins-object.h",
1002    "src/builtins/builtins-promise.cc",
1003    "src/builtins/builtins-promise.h",
1004    "src/builtins/builtins-proxy.cc",
1005    "src/builtins/builtins-reflect.cc",
1006    "src/builtins/builtins-regexp.cc",
1007    "src/builtins/builtins-regexp.h",
1008    "src/builtins/builtins-sharedarraybuffer.cc",
1009    "src/builtins/builtins-string.cc",
1010    "src/builtins/builtins-symbol.cc",
1011    "src/builtins/builtins-typedarray.cc",
1012    "src/builtins/builtins-utils.h",
1013    "src/builtins/builtins-wasm.cc",
1014    "src/builtins/builtins.cc",
1015    "src/builtins/builtins.h",
1016    "src/cached-powers.cc",
1017    "src/cached-powers.h",
1018    "src/cancelable-task.cc",
1019    "src/cancelable-task.h",
1020    "src/char-predicates-inl.h",
1021    "src/char-predicates.cc",
1022    "src/char-predicates.h",
1023    "src/checks.h",
1024    "src/code-events.h",
1025    "src/code-factory.cc",
1026    "src/code-factory.h",
1027    "src/code-stub-assembler.cc",
1028    "src/code-stub-assembler.h",
1029    "src/code-stubs-hydrogen.cc",
1030    "src/code-stubs.cc",
1031    "src/code-stubs.h",
1032    "src/codegen.cc",
1033    "src/codegen.h",
1034    "src/collector.h",
1035    "src/compilation-cache.cc",
1036    "src/compilation-cache.h",
1037    "src/compilation-dependencies.cc",
1038    "src/compilation-dependencies.h",
1039    "src/compilation-info.cc",
1040    "src/compilation-info.h",
1041    "src/compilation-statistics.cc",
1042    "src/compilation-statistics.h",
1043    "src/compiler-dispatcher/compiler-dispatcher-job.cc",
1044    "src/compiler-dispatcher/compiler-dispatcher-job.h",
1045    "src/compiler-dispatcher/compiler-dispatcher-tracer.cc",
1046    "src/compiler-dispatcher/compiler-dispatcher-tracer.h",
1047    "src/compiler-dispatcher/compiler-dispatcher.cc",
1048    "src/compiler-dispatcher/compiler-dispatcher.h",
1049    "src/compiler-dispatcher/optimizing-compile-dispatcher.cc",
1050    "src/compiler-dispatcher/optimizing-compile-dispatcher.h",
1051    "src/compiler.cc",
1052    "src/compiler.h",
1053    "src/compiler/access-builder.cc",
1054    "src/compiler/access-builder.h",
1055    "src/compiler/access-info.cc",
1056    "src/compiler/access-info.h",
1057    "src/compiler/all-nodes.cc",
1058    "src/compiler/all-nodes.h",
1059    "src/compiler/ast-graph-builder.cc",
1060    "src/compiler/ast-graph-builder.h",
1061    "src/compiler/ast-loop-assignment-analyzer.cc",
1062    "src/compiler/ast-loop-assignment-analyzer.h",
1063    "src/compiler/basic-block-instrumentor.cc",
1064    "src/compiler/basic-block-instrumentor.h",
1065    "src/compiler/branch-elimination.cc",
1066    "src/compiler/branch-elimination.h",
1067    "src/compiler/bytecode-analysis.cc",
1068    "src/compiler/bytecode-analysis.h",
1069    "src/compiler/bytecode-graph-builder.cc",
1070    "src/compiler/bytecode-graph-builder.h",
1071    "src/compiler/bytecode-liveness-map.cc",
1072    "src/compiler/bytecode-liveness-map.h",
1073    "src/compiler/c-linkage.cc",
1074    "src/compiler/checkpoint-elimination.cc",
1075    "src/compiler/checkpoint-elimination.h",
1076    "src/compiler/code-assembler.cc",
1077    "src/compiler/code-assembler.h",
1078    "src/compiler/code-generator-impl.h",
1079    "src/compiler/code-generator.cc",
1080    "src/compiler/code-generator.h",
1081    "src/compiler/common-node-cache.cc",
1082    "src/compiler/common-node-cache.h",
1083    "src/compiler/common-operator-reducer.cc",
1084    "src/compiler/common-operator-reducer.h",
1085    "src/compiler/common-operator.cc",
1086    "src/compiler/common-operator.h",
1087    "src/compiler/compiler-source-position-table.cc",
1088    "src/compiler/compiler-source-position-table.h",
1089    "src/compiler/control-builders.cc",
1090    "src/compiler/control-builders.h",
1091    "src/compiler/control-equivalence.cc",
1092    "src/compiler/control-equivalence.h",
1093    "src/compiler/control-flow-optimizer.cc",
1094    "src/compiler/control-flow-optimizer.h",
1095    "src/compiler/dead-code-elimination.cc",
1096    "src/compiler/dead-code-elimination.h",
1097    "src/compiler/diamond.h",
1098    "src/compiler/effect-control-linearizer.cc",
1099    "src/compiler/effect-control-linearizer.h",
1100    "src/compiler/escape-analysis-reducer.cc",
1101    "src/compiler/escape-analysis-reducer.h",
1102    "src/compiler/escape-analysis.cc",
1103    "src/compiler/escape-analysis.h",
1104    "src/compiler/frame-elider.cc",
1105    "src/compiler/frame-elider.h",
1106    "src/compiler/frame-states.cc",
1107    "src/compiler/frame-states.h",
1108    "src/compiler/frame.cc",
1109    "src/compiler/frame.h",
1110    "src/compiler/gap-resolver.cc",
1111    "src/compiler/gap-resolver.h",
1112    "src/compiler/graph-assembler.cc",
1113    "src/compiler/graph-assembler.h",
1114    "src/compiler/graph-reducer.cc",
1115    "src/compiler/graph-reducer.h",
1116    "src/compiler/graph-replay.cc",
1117    "src/compiler/graph-replay.h",
1118    "src/compiler/graph-trimmer.cc",
1119    "src/compiler/graph-trimmer.h",
1120    "src/compiler/graph-visualizer.cc",
1121    "src/compiler/graph-visualizer.h",
1122    "src/compiler/graph.cc",
1123    "src/compiler/graph.h",
1124    "src/compiler/instruction-codes.h",
1125    "src/compiler/instruction-scheduler.cc",
1126    "src/compiler/instruction-scheduler.h",
1127    "src/compiler/instruction-selector-impl.h",
1128    "src/compiler/instruction-selector.cc",
1129    "src/compiler/instruction-selector.h",
1130    "src/compiler/instruction.cc",
1131    "src/compiler/instruction.h",
1132    "src/compiler/int64-lowering.cc",
1133    "src/compiler/int64-lowering.h",
1134    "src/compiler/js-builtin-reducer.cc",
1135    "src/compiler/js-builtin-reducer.h",
1136    "src/compiler/js-call-reducer.cc",
1137    "src/compiler/js-call-reducer.h",
1138    "src/compiler/js-context-specialization.cc",
1139    "src/compiler/js-context-specialization.h",
1140    "src/compiler/js-create-lowering.cc",
1141    "src/compiler/js-create-lowering.h",
1142    "src/compiler/js-frame-specialization.cc",
1143    "src/compiler/js-frame-specialization.h",
1144    "src/compiler/js-generic-lowering.cc",
1145    "src/compiler/js-generic-lowering.h",
1146    "src/compiler/js-graph.cc",
1147    "src/compiler/js-graph.h",
1148    "src/compiler/js-inlining-heuristic.cc",
1149    "src/compiler/js-inlining-heuristic.h",
1150    "src/compiler/js-inlining.cc",
1151    "src/compiler/js-inlining.h",
1152    "src/compiler/js-intrinsic-lowering.cc",
1153    "src/compiler/js-intrinsic-lowering.h",
1154    "src/compiler/js-native-context-specialization.cc",
1155    "src/compiler/js-native-context-specialization.h",
1156    "src/compiler/js-operator.cc",
1157    "src/compiler/js-operator.h",
1158    "src/compiler/js-type-hint-lowering.cc",
1159    "src/compiler/js-type-hint-lowering.h",
1160    "src/compiler/js-typed-lowering.cc",
1161    "src/compiler/js-typed-lowering.h",
1162    "src/compiler/jump-threading.cc",
1163    "src/compiler/jump-threading.h",
1164    "src/compiler/linkage.cc",
1165    "src/compiler/linkage.h",
1166    "src/compiler/live-range-separator.cc",
1167    "src/compiler/live-range-separator.h",
1168    "src/compiler/liveness-analyzer.cc",
1169    "src/compiler/liveness-analyzer.h",
1170    "src/compiler/load-elimination.cc",
1171    "src/compiler/load-elimination.h",
1172    "src/compiler/loop-analysis.cc",
1173    "src/compiler/loop-analysis.h",
1174    "src/compiler/loop-peeling.cc",
1175    "src/compiler/loop-peeling.h",
1176    "src/compiler/loop-variable-optimizer.cc",
1177    "src/compiler/loop-variable-optimizer.h",
1178    "src/compiler/machine-graph-verifier.cc",
1179    "src/compiler/machine-graph-verifier.h",
1180    "src/compiler/machine-operator-reducer.cc",
1181    "src/compiler/machine-operator-reducer.h",
1182    "src/compiler/machine-operator.cc",
1183    "src/compiler/machine-operator.h",
1184    "src/compiler/memory-optimizer.cc",
1185    "src/compiler/memory-optimizer.h",
1186    "src/compiler/move-optimizer.cc",
1187    "src/compiler/move-optimizer.h",
1188    "src/compiler/node-aux-data.h",
1189    "src/compiler/node-cache.cc",
1190    "src/compiler/node-cache.h",
1191    "src/compiler/node-marker.cc",
1192    "src/compiler/node-marker.h",
1193    "src/compiler/node-matchers.cc",
1194    "src/compiler/node-matchers.h",
1195    "src/compiler/node-properties.cc",
1196    "src/compiler/node-properties.h",
1197    "src/compiler/node.cc",
1198    "src/compiler/node.h",
1199    "src/compiler/opcodes.cc",
1200    "src/compiler/opcodes.h",
1201    "src/compiler/operation-typer.cc",
1202    "src/compiler/operation-typer.h",
1203    "src/compiler/operator-properties.cc",
1204    "src/compiler/operator-properties.h",
1205    "src/compiler/operator.cc",
1206    "src/compiler/operator.h",
1207    "src/compiler/osr.cc",
1208    "src/compiler/osr.h",
1209    "src/compiler/pipeline-statistics.cc",
1210    "src/compiler/pipeline-statistics.h",
1211    "src/compiler/pipeline.cc",
1212    "src/compiler/pipeline.h",
1213    "src/compiler/raw-machine-assembler.cc",
1214    "src/compiler/raw-machine-assembler.h",
1215    "src/compiler/redundancy-elimination.cc",
1216    "src/compiler/redundancy-elimination.h",
1217    "src/compiler/register-allocator-verifier.cc",
1218    "src/compiler/register-allocator-verifier.h",
1219    "src/compiler/register-allocator.cc",
1220    "src/compiler/register-allocator.h",
1221    "src/compiler/representation-change.cc",
1222    "src/compiler/representation-change.h",
1223    "src/compiler/schedule.cc",
1224    "src/compiler/schedule.h",
1225    "src/compiler/scheduler.cc",
1226    "src/compiler/scheduler.h",
1227    "src/compiler/select-lowering.cc",
1228    "src/compiler/select-lowering.h",
1229    "src/compiler/simd-scalar-lowering.cc",
1230    "src/compiler/simd-scalar-lowering.h",
1231    "src/compiler/simplified-lowering.cc",
1232    "src/compiler/simplified-lowering.h",
1233    "src/compiler/simplified-operator-reducer.cc",
1234    "src/compiler/simplified-operator-reducer.h",
1235    "src/compiler/simplified-operator.cc",
1236    "src/compiler/simplified-operator.h",
1237    "src/compiler/state-values-utils.cc",
1238    "src/compiler/state-values-utils.h",
1239    "src/compiler/store-store-elimination.cc",
1240    "src/compiler/store-store-elimination.h",
1241    "src/compiler/tail-call-optimization.cc",
1242    "src/compiler/tail-call-optimization.h",
1243    "src/compiler/type-cache.cc",
1244    "src/compiler/type-cache.h",
1245    "src/compiler/typed-optimization.cc",
1246    "src/compiler/typed-optimization.h",
1247    "src/compiler/typer.cc",
1248    "src/compiler/typer.h",
1249    "src/compiler/types.cc",
1250    "src/compiler/types.h",
1251    "src/compiler/unwinding-info-writer.h",
1252    "src/compiler/value-numbering-reducer.cc",
1253    "src/compiler/value-numbering-reducer.h",
1254    "src/compiler/verifier.cc",
1255    "src/compiler/verifier.h",
1256    "src/compiler/wasm-compiler.cc",
1257    "src/compiler/wasm-compiler.h",
1258    "src/compiler/wasm-linkage.cc",
1259    "src/compiler/zone-stats.cc",
1260    "src/compiler/zone-stats.h",
1261    "src/context-measure.cc",
1262    "src/context-measure.h",
1263    "src/contexts-inl.h",
1264    "src/contexts.cc",
1265    "src/contexts.h",
1266    "src/conversions-inl.h",
1267    "src/conversions.cc",
1268    "src/conversions.h",
1269    "src/counters-inl.h",
1270    "src/counters.cc",
1271    "src/counters.h",
1272    "src/crankshaft/compilation-phase.cc",
1273    "src/crankshaft/compilation-phase.h",
1274    "src/crankshaft/hydrogen-alias-analysis.h",
1275    "src/crankshaft/hydrogen-bce.cc",
1276    "src/crankshaft/hydrogen-bce.h",
1277    "src/crankshaft/hydrogen-canonicalize.cc",
1278    "src/crankshaft/hydrogen-canonicalize.h",
1279    "src/crankshaft/hydrogen-check-elimination.cc",
1280    "src/crankshaft/hydrogen-check-elimination.h",
1281    "src/crankshaft/hydrogen-dce.cc",
1282    "src/crankshaft/hydrogen-dce.h",
1283    "src/crankshaft/hydrogen-dehoist.cc",
1284    "src/crankshaft/hydrogen-dehoist.h",
1285    "src/crankshaft/hydrogen-environment-liveness.cc",
1286    "src/crankshaft/hydrogen-environment-liveness.h",
1287    "src/crankshaft/hydrogen-escape-analysis.cc",
1288    "src/crankshaft/hydrogen-escape-analysis.h",
1289    "src/crankshaft/hydrogen-flow-engine.h",
1290    "src/crankshaft/hydrogen-gvn.cc",
1291    "src/crankshaft/hydrogen-gvn.h",
1292    "src/crankshaft/hydrogen-infer-representation.cc",
1293    "src/crankshaft/hydrogen-infer-representation.h",
1294    "src/crankshaft/hydrogen-infer-types.cc",
1295    "src/crankshaft/hydrogen-infer-types.h",
1296    "src/crankshaft/hydrogen-instructions.cc",
1297    "src/crankshaft/hydrogen-instructions.h",
1298    "src/crankshaft/hydrogen-load-elimination.cc",
1299    "src/crankshaft/hydrogen-load-elimination.h",
1300    "src/crankshaft/hydrogen-mark-unreachable.cc",
1301    "src/crankshaft/hydrogen-mark-unreachable.h",
1302    "src/crankshaft/hydrogen-osr.cc",
1303    "src/crankshaft/hydrogen-osr.h",
1304    "src/crankshaft/hydrogen-range-analysis.cc",
1305    "src/crankshaft/hydrogen-range-analysis.h",
1306    "src/crankshaft/hydrogen-redundant-phi.cc",
1307    "src/crankshaft/hydrogen-redundant-phi.h",
1308    "src/crankshaft/hydrogen-removable-simulates.cc",
1309    "src/crankshaft/hydrogen-removable-simulates.h",
1310    "src/crankshaft/hydrogen-representation-changes.cc",
1311    "src/crankshaft/hydrogen-representation-changes.h",
1312    "src/crankshaft/hydrogen-sce.cc",
1313    "src/crankshaft/hydrogen-sce.h",
1314    "src/crankshaft/hydrogen-store-elimination.cc",
1315    "src/crankshaft/hydrogen-store-elimination.h",
1316    "src/crankshaft/hydrogen-types.cc",
1317    "src/crankshaft/hydrogen-types.h",
1318    "src/crankshaft/hydrogen-uint32-analysis.cc",
1319    "src/crankshaft/hydrogen-uint32-analysis.h",
1320    "src/crankshaft/hydrogen.cc",
1321    "src/crankshaft/hydrogen.h",
1322    "src/crankshaft/lithium-allocator-inl.h",
1323    "src/crankshaft/lithium-allocator.cc",
1324    "src/crankshaft/lithium-allocator.h",
1325    "src/crankshaft/lithium-codegen.cc",
1326    "src/crankshaft/lithium-codegen.h",
1327    "src/crankshaft/lithium-inl.h",
1328    "src/crankshaft/lithium.cc",
1329    "src/crankshaft/lithium.h",
1330    "src/crankshaft/typing.cc",
1331    "src/crankshaft/typing.h",
1332    "src/crankshaft/unique.h",
1333    "src/date.cc",
1334    "src/date.h",
1335    "src/dateparser-inl.h",
1336    "src/dateparser.cc",
1337    "src/dateparser.h",
1338    "src/debug/debug-coverage.cc",
1339    "src/debug/debug-coverage.h",
1340    "src/debug/debug-evaluate.cc",
1341    "src/debug/debug-evaluate.h",
1342    "src/debug/debug-frames.cc",
1343    "src/debug/debug-frames.h",
1344    "src/debug/debug-interface.h",
1345    "src/debug/debug-scopes.cc",
1346    "src/debug/debug-scopes.h",
1347    "src/debug/debug.cc",
1348    "src/debug/debug.h",
1349    "src/debug/interface-types.h",
1350    "src/debug/liveedit.cc",
1351    "src/debug/liveedit.h",
1352    "src/deoptimize-reason.cc",
1353    "src/deoptimize-reason.h",
1354    "src/deoptimizer.cc",
1355    "src/deoptimizer.h",
1356    "src/disasm.h",
1357    "src/disassembler.cc",
1358    "src/disassembler.h",
1359    "src/diy-fp.cc",
1360    "src/diy-fp.h",
1361    "src/double.h",
1362    "src/dtoa.cc",
1363    "src/dtoa.h",
1364    "src/effects.h",
1365    "src/eh-frame.cc",
1366    "src/eh-frame.h",
1367    "src/elements-kind.cc",
1368    "src/elements-kind.h",
1369    "src/elements.cc",
1370    "src/elements.h",
1371    "src/execution.cc",
1372    "src/execution.h",
1373    "src/extensions/externalize-string-extension.cc",
1374    "src/extensions/externalize-string-extension.h",
1375    "src/extensions/free-buffer-extension.cc",
1376    "src/extensions/free-buffer-extension.h",
1377    "src/extensions/gc-extension.cc",
1378    "src/extensions/gc-extension.h",
1379    "src/extensions/ignition-statistics-extension.cc",
1380    "src/extensions/ignition-statistics-extension.h",
1381    "src/extensions/statistics-extension.cc",
1382    "src/extensions/statistics-extension.h",
1383    "src/extensions/trigger-failure-extension.cc",
1384    "src/extensions/trigger-failure-extension.h",
1385    "src/external-reference-table.cc",
1386    "src/external-reference-table.h",
1387    "src/factory.cc",
1388    "src/factory.h",
1389    "src/fast-accessor-assembler.cc",
1390    "src/fast-accessor-assembler.h",
1391    "src/fast-dtoa.cc",
1392    "src/fast-dtoa.h",
1393    "src/feedback-vector-inl.h",
1394    "src/feedback-vector.cc",
1395    "src/feedback-vector.h",
1396    "src/ffi/ffi-compiler.cc",
1397    "src/ffi/ffi-compiler.h",
1398    "src/field-index-inl.h",
1399    "src/field-index.h",
1400    "src/field-type.cc",
1401    "src/field-type.h",
1402    "src/find-and-replace-pattern.h",
1403    "src/fixed-dtoa.cc",
1404    "src/fixed-dtoa.h",
1405    "src/flag-definitions.h",
1406    "src/flags.cc",
1407    "src/flags.h",
1408    "src/frames-inl.h",
1409    "src/frames.cc",
1410    "src/frames.h",
1411    "src/full-codegen/full-codegen.cc",
1412    "src/full-codegen/full-codegen.h",
1413    "src/futex-emulation.cc",
1414    "src/futex-emulation.h",
1415    "src/gdb-jit.cc",
1416    "src/gdb-jit.h",
1417    "src/global-handles.cc",
1418    "src/global-handles.h",
1419    "src/globals.h",
1420    "src/handles-inl.h",
1421    "src/handles.cc",
1422    "src/handles.h",
1423    "src/heap-symbols.h",
1424    "src/heap/array-buffer-tracker-inl.h",
1425    "src/heap/array-buffer-tracker.cc",
1426    "src/heap/array-buffer-tracker.h",
1427    "src/heap/code-stats.cc",
1428    "src/heap/code-stats.h",
1429    "src/heap/embedder-tracing.cc",
1430    "src/heap/embedder-tracing.h",
1431    "src/heap/gc-idle-time-handler.cc",
1432    "src/heap/gc-idle-time-handler.h",
1433    "src/heap/gc-tracer.cc",
1434    "src/heap/gc-tracer.h",
1435    "src/heap/heap-inl.h",
1436    "src/heap/heap.cc",
1437    "src/heap/heap.h",
1438    "src/heap/incremental-marking-inl.h",
1439    "src/heap/incremental-marking-job.cc",
1440    "src/heap/incremental-marking-job.h",
1441    "src/heap/incremental-marking.cc",
1442    "src/heap/incremental-marking.h",
1443    "src/heap/mark-compact-inl.h",
1444    "src/heap/mark-compact.cc",
1445    "src/heap/mark-compact.h",
1446    "src/heap/marking.h",
1447    "src/heap/memory-reducer.cc",
1448    "src/heap/memory-reducer.h",
1449    "src/heap/object-stats.cc",
1450    "src/heap/object-stats.h",
1451    "src/heap/objects-visiting-inl.h",
1452    "src/heap/objects-visiting.cc",
1453    "src/heap/objects-visiting.h",
1454    "src/heap/page-parallel-job.h",
1455    "src/heap/remembered-set.h",
1456    "src/heap/scavenge-job.cc",
1457    "src/heap/scavenge-job.h",
1458    "src/heap/scavenger-inl.h",
1459    "src/heap/scavenger.cc",
1460    "src/heap/scavenger.h",
1461    "src/heap/slot-set.h",
1462    "src/heap/spaces-inl.h",
1463    "src/heap/spaces.cc",
1464    "src/heap/spaces.h",
1465    "src/heap/store-buffer.cc",
1466    "src/heap/store-buffer.h",
1467    "src/i18n.cc",
1468    "src/i18n.h",
1469    "src/ic/access-compiler-data.h",
1470    "src/ic/access-compiler.cc",
1471    "src/ic/access-compiler.h",
1472    "src/ic/accessor-assembler.cc",
1473    "src/ic/accessor-assembler.h",
1474    "src/ic/call-optimization.cc",
1475    "src/ic/call-optimization.h",
1476    "src/ic/handler-compiler.cc",
1477    "src/ic/handler-compiler.h",
1478    "src/ic/handler-configuration-inl.h",
1479    "src/ic/handler-configuration.h",
1480    "src/ic/ic-inl.h",
1481    "src/ic/ic-state.cc",
1482    "src/ic/ic-state.h",
1483    "src/ic/ic-stats.cc",
1484    "src/ic/ic-stats.h",
1485    "src/ic/ic.cc",
1486    "src/ic/ic.h",
1487    "src/ic/keyed-store-generic.cc",
1488    "src/ic/keyed-store-generic.h",
1489    "src/ic/stub-cache.cc",
1490    "src/ic/stub-cache.h",
1491    "src/icu_util.cc",
1492    "src/icu_util.h",
1493    "src/identity-map.cc",
1494    "src/identity-map.h",
1495    "src/interface-descriptors.cc",
1496    "src/interface-descriptors.h",
1497    "src/interpreter/bytecode-array-accessor.cc",
1498    "src/interpreter/bytecode-array-accessor.h",
1499    "src/interpreter/bytecode-array-builder.cc",
1500    "src/interpreter/bytecode-array-builder.h",
1501    "src/interpreter/bytecode-array-iterator.cc",
1502    "src/interpreter/bytecode-array-iterator.h",
1503    "src/interpreter/bytecode-array-random-iterator.cc",
1504    "src/interpreter/bytecode-array-random-iterator.h",
1505    "src/interpreter/bytecode-array-writer.cc",
1506    "src/interpreter/bytecode-array-writer.h",
1507    "src/interpreter/bytecode-dead-code-optimizer.cc",
1508    "src/interpreter/bytecode-dead-code-optimizer.h",
1509    "src/interpreter/bytecode-decoder.cc",
1510    "src/interpreter/bytecode-decoder.h",
1511    "src/interpreter/bytecode-flags.cc",
1512    "src/interpreter/bytecode-flags.h",
1513    "src/interpreter/bytecode-generator.cc",
1514    "src/interpreter/bytecode-generator.h",
1515    "src/interpreter/bytecode-label.cc",
1516    "src/interpreter/bytecode-label.h",
1517    "src/interpreter/bytecode-operands.cc",
1518    "src/interpreter/bytecode-operands.h",
1519    "src/interpreter/bytecode-peephole-optimizer.cc",
1520    "src/interpreter/bytecode-peephole-optimizer.h",
1521    "src/interpreter/bytecode-peephole-table.h",
1522    "src/interpreter/bytecode-pipeline.cc",
1523    "src/interpreter/bytecode-pipeline.h",
1524    "src/interpreter/bytecode-register-allocator.h",
1525    "src/interpreter/bytecode-register-optimizer.cc",
1526    "src/interpreter/bytecode-register-optimizer.h",
1527    "src/interpreter/bytecode-register.cc",
1528    "src/interpreter/bytecode-register.h",
1529    "src/interpreter/bytecode-traits.h",
1530    "src/interpreter/bytecodes.cc",
1531    "src/interpreter/bytecodes.h",
1532    "src/interpreter/constant-array-builder.cc",
1533    "src/interpreter/constant-array-builder.h",
1534    "src/interpreter/control-flow-builders.cc",
1535    "src/interpreter/control-flow-builders.h",
1536    "src/interpreter/handler-table-builder.cc",
1537    "src/interpreter/handler-table-builder.h",
1538    "src/interpreter/interpreter-assembler.cc",
1539    "src/interpreter/interpreter-assembler.h",
1540    "src/interpreter/interpreter-intrinsics.cc",
1541    "src/interpreter/interpreter-intrinsics.h",
1542    "src/interpreter/interpreter.cc",
1543    "src/interpreter/interpreter.h",
1544    "src/isolate-inl.h",
1545    "src/isolate.cc",
1546    "src/isolate.h",
1547    "src/json-parser.cc",
1548    "src/json-parser.h",
1549    "src/json-stringifier.cc",
1550    "src/json-stringifier.h",
1551    "src/keys.cc",
1552    "src/keys.h",
1553    "src/label.h",
1554    "src/layout-descriptor-inl.h",
1555    "src/layout-descriptor.cc",
1556    "src/layout-descriptor.h",
1557    "src/list-inl.h",
1558    "src/list.h",
1559    "src/locked-queue-inl.h",
1560    "src/locked-queue.h",
1561    "src/log-inl.h",
1562    "src/log-utils.cc",
1563    "src/log-utils.h",
1564    "src/log.cc",
1565    "src/log.h",
1566    "src/lookup-cache-inl.h",
1567    "src/lookup-cache.cc",
1568    "src/lookup-cache.h",
1569    "src/lookup.cc",
1570    "src/lookup.h",
1571    "src/machine-type.cc",
1572    "src/machine-type.h",
1573    "src/macro-assembler.h",
1574    "src/managed.h",
1575    "src/map-updater.cc",
1576    "src/map-updater.h",
1577    "src/messages.cc",
1578    "src/messages.h",
1579    "src/msan.h",
1580    "src/objects-body-descriptors-inl.h",
1581    "src/objects-body-descriptors.h",
1582    "src/objects-debug.cc",
1583    "src/objects-inl.h",
1584    "src/objects-printer.cc",
1585    "src/objects.cc",
1586    "src/objects.h",
1587    "src/objects/literal-objects.cc",
1588    "src/objects/literal-objects.h",
1589    "src/objects/module-info.h",
1590    "src/objects/object-macros-undef.h",
1591    "src/objects/object-macros.h",
1592    "src/objects/regexp-match-info.h",
1593    "src/objects/scope-info.cc",
1594    "src/objects/scope-info.h",
1595    "src/ostreams.cc",
1596    "src/ostreams.h",
1597    "src/parsing/duplicate-finder.cc",
1598    "src/parsing/duplicate-finder.h",
1599    "src/parsing/expression-classifier.h",
1600    "src/parsing/func-name-inferrer.cc",
1601    "src/parsing/func-name-inferrer.h",
1602    "src/parsing/parameter-initializer-rewriter.cc",
1603    "src/parsing/parameter-initializer-rewriter.h",
1604    "src/parsing/parse-info.cc",
1605    "src/parsing/parse-info.h",
1606    "src/parsing/parser-base.h",
1607    "src/parsing/parser.cc",
1608    "src/parsing/parser.h",
1609    "src/parsing/parsing.cc",
1610    "src/parsing/parsing.h",
1611    "src/parsing/pattern-rewriter.cc",
1612    "src/parsing/preparse-data-format.h",
1613    "src/parsing/preparse-data.cc",
1614    "src/parsing/preparse-data.h",
1615    "src/parsing/preparsed-scope-data.cc",
1616    "src/parsing/preparsed-scope-data.h",
1617    "src/parsing/preparser.cc",
1618    "src/parsing/preparser.h",
1619    "src/parsing/rewriter.cc",
1620    "src/parsing/rewriter.h",
1621    "src/parsing/scanner-character-streams.cc",
1622    "src/parsing/scanner-character-streams.h",
1623    "src/parsing/scanner.cc",
1624    "src/parsing/scanner.h",
1625    "src/parsing/token.cc",
1626    "src/parsing/token.h",
1627    "src/pending-compilation-error-handler.cc",
1628    "src/pending-compilation-error-handler.h",
1629    "src/perf-jit.cc",
1630    "src/perf-jit.h",
1631    "src/profiler/allocation-tracker.cc",
1632    "src/profiler/allocation-tracker.h",
1633    "src/profiler/circular-queue-inl.h",
1634    "src/profiler/circular-queue.h",
1635    "src/profiler/cpu-profiler-inl.h",
1636    "src/profiler/cpu-profiler.cc",
1637    "src/profiler/cpu-profiler.h",
1638    "src/profiler/heap-profiler.cc",
1639    "src/profiler/heap-profiler.h",
1640    "src/profiler/heap-snapshot-generator-inl.h",
1641    "src/profiler/heap-snapshot-generator.cc",
1642    "src/profiler/heap-snapshot-generator.h",
1643    "src/profiler/profile-generator-inl.h",
1644    "src/profiler/profile-generator.cc",
1645    "src/profiler/profile-generator.h",
1646    "src/profiler/profiler-listener.cc",
1647    "src/profiler/profiler-listener.h",
1648    "src/profiler/sampling-heap-profiler.cc",
1649    "src/profiler/sampling-heap-profiler.h",
1650    "src/profiler/strings-storage.cc",
1651    "src/profiler/strings-storage.h",
1652    "src/profiler/tick-sample.cc",
1653    "src/profiler/tick-sample.h",
1654    "src/profiler/tracing-cpu-profiler.cc",
1655    "src/profiler/tracing-cpu-profiler.h",
1656    "src/profiler/unbound-queue-inl.h",
1657    "src/profiler/unbound-queue.h",
1658    "src/property-descriptor.cc",
1659    "src/property-descriptor.h",
1660    "src/property-details.h",
1661    "src/property.cc",
1662    "src/property.h",
1663    "src/prototype.h",
1664    "src/regexp/bytecodes-irregexp.h",
1665    "src/regexp/interpreter-irregexp.cc",
1666    "src/regexp/interpreter-irregexp.h",
1667    "src/regexp/jsregexp-inl.h",
1668    "src/regexp/jsregexp.cc",
1669    "src/regexp/jsregexp.h",
1670    "src/regexp/regexp-ast.cc",
1671    "src/regexp/regexp-ast.h",
1672    "src/regexp/regexp-macro-assembler-irregexp-inl.h",
1673    "src/regexp/regexp-macro-assembler-irregexp.cc",
1674    "src/regexp/regexp-macro-assembler-irregexp.h",
1675    "src/regexp/regexp-macro-assembler-tracer.cc",
1676    "src/regexp/regexp-macro-assembler-tracer.h",
1677    "src/regexp/regexp-macro-assembler.cc",
1678    "src/regexp/regexp-macro-assembler.h",
1679    "src/regexp/regexp-parser.cc",
1680    "src/regexp/regexp-parser.h",
1681    "src/regexp/regexp-stack.cc",
1682    "src/regexp/regexp-stack.h",
1683    "src/regexp/regexp-utils.cc",
1684    "src/regexp/regexp-utils.h",
1685    "src/register-configuration.cc",
1686    "src/register-configuration.h",
1687    "src/runtime-profiler.cc",
1688    "src/runtime-profiler.h",
1689    "src/runtime/runtime-array.cc",
1690    "src/runtime/runtime-atomics.cc",
1691    "src/runtime/runtime-classes.cc",
1692    "src/runtime/runtime-collections.cc",
1693    "src/runtime/runtime-compiler.cc",
1694    "src/runtime/runtime-date.cc",
1695    "src/runtime/runtime-debug.cc",
1696    "src/runtime/runtime-error.cc",
1697    "src/runtime/runtime-forin.cc",
1698    "src/runtime/runtime-function.cc",
1699    "src/runtime/runtime-futex.cc",
1700    "src/runtime/runtime-generator.cc",
1701    "src/runtime/runtime-i18n.cc",
1702    "src/runtime/runtime-internal.cc",
1703    "src/runtime/runtime-interpreter.cc",
1704    "src/runtime/runtime-literals.cc",
1705    "src/runtime/runtime-liveedit.cc",
1706    "src/runtime/runtime-maths.cc",
1707    "src/runtime/runtime-module.cc",
1708    "src/runtime/runtime-numbers.cc",
1709    "src/runtime/runtime-object.cc",
1710    "src/runtime/runtime-operators.cc",
1711    "src/runtime/runtime-promise.cc",
1712    "src/runtime/runtime-proxy.cc",
1713    "src/runtime/runtime-regexp.cc",
1714    "src/runtime/runtime-scopes.cc",
1715    "src/runtime/runtime-strings.cc",
1716    "src/runtime/runtime-symbol.cc",
1717    "src/runtime/runtime-test.cc",
1718    "src/runtime/runtime-typedarray.cc",
1719    "src/runtime/runtime-utils.h",
1720    "src/runtime/runtime-wasm.cc",
1721    "src/runtime/runtime.cc",
1722    "src/runtime/runtime.h",
1723    "src/safepoint-table.cc",
1724    "src/safepoint-table.h",
1725    "src/signature.h",
1726    "src/simulator.h",
1727    "src/small-pointer-list.h",
1728    "src/snapshot/code-serializer.cc",
1729    "src/snapshot/code-serializer.h",
1730    "src/snapshot/deserializer.cc",
1731    "src/snapshot/deserializer.h",
1732    "src/snapshot/natives-common.cc",
1733    "src/snapshot/natives.h",
1734    "src/snapshot/partial-serializer.cc",
1735    "src/snapshot/partial-serializer.h",
1736    "src/snapshot/serializer-common.cc",
1737    "src/snapshot/serializer-common.h",
1738    "src/snapshot/serializer.cc",
1739    "src/snapshot/serializer.h",
1740    "src/snapshot/snapshot-common.cc",
1741    "src/snapshot/snapshot-source-sink.cc",
1742    "src/snapshot/snapshot-source-sink.h",
1743    "src/snapshot/snapshot.h",
1744    "src/snapshot/startup-serializer.cc",
1745    "src/snapshot/startup-serializer.h",
1746    "src/source-position-table.cc",
1747    "src/source-position-table.h",
1748    "src/source-position.cc",
1749    "src/source-position.h",
1750    "src/splay-tree-inl.h",
1751    "src/splay-tree.h",
1752    "src/startup-data-util.cc",
1753    "src/startup-data-util.h",
1754    "src/string-builder.cc",
1755    "src/string-builder.h",
1756    "src/string-case.cc",
1757    "src/string-case.h",
1758    "src/string-search.h",
1759    "src/string-stream.cc",
1760    "src/string-stream.h",
1761    "src/strtod.cc",
1762    "src/strtod.h",
1763    "src/tracing/trace-event.cc",
1764    "src/tracing/trace-event.h",
1765    "src/tracing/traced-value.cc",
1766    "src/tracing/traced-value.h",
1767    "src/tracing/tracing-category-observer.cc",
1768    "src/tracing/tracing-category-observer.h",
1769    "src/transitions-inl.h",
1770    "src/transitions.cc",
1771    "src/transitions.h",
1772    "src/trap-handler/trap-handler.h",
1773    "src/type-hints.cc",
1774    "src/type-hints.h",
1775    "src/type-info.cc",
1776    "src/type-info.h",
1777    "src/unicode-cache-inl.h",
1778    "src/unicode-cache.h",
1779    "src/unicode-decoder.cc",
1780    "src/unicode-decoder.h",
1781    "src/unicode-inl.h",
1782    "src/unicode.cc",
1783    "src/unicode.h",
1784    "src/uri.cc",
1785    "src/uri.h",
1786    "src/utils-inl.h",
1787    "src/utils.cc",
1788    "src/utils.h",
1789    "src/v8.cc",
1790    "src/v8.h",
1791    "src/v8memory.h",
1792    "src/v8threads.cc",
1793    "src/v8threads.h",
1794    "src/value-serializer.cc",
1795    "src/value-serializer.h",
1796    "src/vector.h",
1797    "src/version.cc",
1798    "src/version.h",
1799    "src/vm-state-inl.h",
1800    "src/vm-state.h",
1801    "src/wasm/decoder.h",
1802    "src/wasm/function-body-decoder-impl.h",
1803    "src/wasm/function-body-decoder.cc",
1804    "src/wasm/function-body-decoder.h",
1805    "src/wasm/leb-helper.h",
1806    "src/wasm/module-decoder.cc",
1807    "src/wasm/module-decoder.h",
1808    "src/wasm/signature-map.cc",
1809    "src/wasm/signature-map.h",
1810    "src/wasm/wasm-code-specialization.cc",
1811    "src/wasm/wasm-code-specialization.h",
1812    "src/wasm/wasm-debug.cc",
1813    "src/wasm/wasm-external-refs.cc",
1814    "src/wasm/wasm-external-refs.h",
1815    "src/wasm/wasm-interpreter.cc",
1816    "src/wasm/wasm-interpreter.h",
1817    "src/wasm/wasm-js.cc",
1818    "src/wasm/wasm-js.h",
1819    "src/wasm/wasm-limits.h",
1820    "src/wasm/wasm-macro-gen.h",
1821    "src/wasm/wasm-module-builder.cc",
1822    "src/wasm/wasm-module-builder.h",
1823    "src/wasm/wasm-module.cc",
1824    "src/wasm/wasm-module.h",
1825    "src/wasm/wasm-objects.cc",
1826    "src/wasm/wasm-objects.h",
1827    "src/wasm/wasm-opcodes.cc",
1828    "src/wasm/wasm-opcodes.h",
1829    "src/wasm/wasm-result.cc",
1830    "src/wasm/wasm-result.h",
1831    "src/wasm/wasm-text.cc",
1832    "src/wasm/wasm-text.h",
1833    "src/zone/accounting-allocator.cc",
1834    "src/zone/accounting-allocator.h",
1835    "src/zone/zone-allocator.h",
1836    "src/zone/zone-allocator.h",
1837    "src/zone/zone-chunk-list.h",
1838    "src/zone/zone-containers.h",
1839    "src/zone/zone-handle-set.h",
1840    "src/zone/zone-segment.cc",
1841    "src/zone/zone-segment.h",
1842    "src/zone/zone.cc",
1843    "src/zone/zone.h",
1844  ]
1845
1846  if (v8_current_cpu == "x86") {
1847    sources += [  ### gcmole(arch:ia32) ###
1848      "src/builtins/ia32/builtins-ia32.cc",
1849      "src/compiler/ia32/code-generator-ia32.cc",
1850      "src/compiler/ia32/instruction-codes-ia32.h",
1851      "src/compiler/ia32/instruction-scheduler-ia32.cc",
1852      "src/compiler/ia32/instruction-selector-ia32.cc",
1853      "src/crankshaft/ia32/lithium-codegen-ia32.cc",
1854      "src/crankshaft/ia32/lithium-codegen-ia32.h",
1855      "src/crankshaft/ia32/lithium-gap-resolver-ia32.cc",
1856      "src/crankshaft/ia32/lithium-gap-resolver-ia32.h",
1857      "src/crankshaft/ia32/lithium-ia32.cc",
1858      "src/crankshaft/ia32/lithium-ia32.h",
1859      "src/debug/ia32/debug-ia32.cc",
1860      "src/full-codegen/ia32/full-codegen-ia32.cc",
1861      "src/ia32/assembler-ia32-inl.h",
1862      "src/ia32/assembler-ia32.cc",
1863      "src/ia32/assembler-ia32.h",
1864      "src/ia32/code-stubs-ia32.cc",
1865      "src/ia32/code-stubs-ia32.h",
1866      "src/ia32/codegen-ia32.cc",
1867      "src/ia32/codegen-ia32.h",
1868      "src/ia32/cpu-ia32.cc",
1869      "src/ia32/deoptimizer-ia32.cc",
1870      "src/ia32/disasm-ia32.cc",
1871      "src/ia32/frames-ia32.cc",
1872      "src/ia32/frames-ia32.h",
1873      "src/ia32/interface-descriptors-ia32.cc",
1874      "src/ia32/macro-assembler-ia32.cc",
1875      "src/ia32/macro-assembler-ia32.h",
1876      "src/ia32/simulator-ia32.cc",
1877      "src/ia32/simulator-ia32.h",
1878      "src/ic/ia32/access-compiler-ia32.cc",
1879      "src/ic/ia32/handler-compiler-ia32.cc",
1880      "src/ic/ia32/ic-ia32.cc",
1881      "src/regexp/ia32/regexp-macro-assembler-ia32.cc",
1882      "src/regexp/ia32/regexp-macro-assembler-ia32.h",
1883    ]
1884  } else if (v8_current_cpu == "x64") {
1885    sources += [  ### gcmole(arch:x64) ###
1886      "src/builtins/x64/builtins-x64.cc",
1887      "src/compiler/x64/code-generator-x64.cc",
1888      "src/compiler/x64/instruction-codes-x64.h",
1889      "src/compiler/x64/instruction-scheduler-x64.cc",
1890      "src/compiler/x64/instruction-selector-x64.cc",
1891      "src/compiler/x64/unwinding-info-writer-x64.cc",
1892      "src/compiler/x64/unwinding-info-writer-x64.h",
1893      "src/crankshaft/x64/lithium-codegen-x64.cc",
1894      "src/crankshaft/x64/lithium-codegen-x64.h",
1895      "src/crankshaft/x64/lithium-gap-resolver-x64.cc",
1896      "src/crankshaft/x64/lithium-gap-resolver-x64.h",
1897      "src/crankshaft/x64/lithium-x64.cc",
1898      "src/crankshaft/x64/lithium-x64.h",
1899      "src/debug/x64/debug-x64.cc",
1900      "src/full-codegen/x64/full-codegen-x64.cc",
1901      "src/ic/x64/access-compiler-x64.cc",
1902      "src/ic/x64/handler-compiler-x64.cc",
1903      "src/ic/x64/ic-x64.cc",
1904      "src/regexp/x64/regexp-macro-assembler-x64.cc",
1905      "src/regexp/x64/regexp-macro-assembler-x64.h",
1906      "src/third_party/valgrind/valgrind.h",
1907      "src/x64/assembler-x64-inl.h",
1908      "src/x64/assembler-x64.cc",
1909      "src/x64/assembler-x64.h",
1910      "src/x64/code-stubs-x64.cc",
1911      "src/x64/code-stubs-x64.h",
1912      "src/x64/codegen-x64.cc",
1913      "src/x64/codegen-x64.h",
1914      "src/x64/cpu-x64.cc",
1915      "src/x64/deoptimizer-x64.cc",
1916      "src/x64/disasm-x64.cc",
1917      "src/x64/eh-frame-x64.cc",
1918      "src/x64/frames-x64.cc",
1919      "src/x64/frames-x64.h",
1920      "src/x64/interface-descriptors-x64.cc",
1921      "src/x64/macro-assembler-x64.cc",
1922      "src/x64/macro-assembler-x64.h",
1923      "src/x64/simulator-x64.cc",
1924      "src/x64/simulator-x64.h",
1925      "src/x64/sse-instr.h",
1926    ]
1927  } else if (v8_current_cpu == "arm") {
1928    sources += [  ### gcmole(arch:arm) ###
1929      "src/arm/assembler-arm-inl.h",
1930      "src/arm/assembler-arm.cc",
1931      "src/arm/assembler-arm.h",
1932      "src/arm/code-stubs-arm.cc",
1933      "src/arm/code-stubs-arm.h",
1934      "src/arm/codegen-arm.cc",
1935      "src/arm/codegen-arm.h",
1936      "src/arm/constants-arm.cc",
1937      "src/arm/constants-arm.h",
1938      "src/arm/cpu-arm.cc",
1939      "src/arm/deoptimizer-arm.cc",
1940      "src/arm/disasm-arm.cc",
1941      "src/arm/eh-frame-arm.cc",
1942      "src/arm/frames-arm.cc",
1943      "src/arm/frames-arm.h",
1944      "src/arm/interface-descriptors-arm.cc",
1945      "src/arm/interface-descriptors-arm.h",
1946      "src/arm/macro-assembler-arm.cc",
1947      "src/arm/macro-assembler-arm.h",
1948      "src/arm/simulator-arm.cc",
1949      "src/arm/simulator-arm.h",
1950      "src/builtins/arm/builtins-arm.cc",
1951      "src/compiler/arm/code-generator-arm.cc",
1952      "src/compiler/arm/instruction-codes-arm.h",
1953      "src/compiler/arm/instruction-scheduler-arm.cc",
1954      "src/compiler/arm/instruction-selector-arm.cc",
1955      "src/compiler/arm/unwinding-info-writer-arm.cc",
1956      "src/compiler/arm/unwinding-info-writer-arm.h",
1957      "src/crankshaft/arm/lithium-arm.cc",
1958      "src/crankshaft/arm/lithium-arm.h",
1959      "src/crankshaft/arm/lithium-codegen-arm.cc",
1960      "src/crankshaft/arm/lithium-codegen-arm.h",
1961      "src/crankshaft/arm/lithium-gap-resolver-arm.cc",
1962      "src/crankshaft/arm/lithium-gap-resolver-arm.h",
1963      "src/debug/arm/debug-arm.cc",
1964      "src/full-codegen/arm/full-codegen-arm.cc",
1965      "src/ic/arm/access-compiler-arm.cc",
1966      "src/ic/arm/handler-compiler-arm.cc",
1967      "src/ic/arm/ic-arm.cc",
1968      "src/regexp/arm/regexp-macro-assembler-arm.cc",
1969      "src/regexp/arm/regexp-macro-assembler-arm.h",
1970    ]
1971  } else if (v8_current_cpu == "arm64") {
1972    sources += [  ### gcmole(arch:arm64) ###
1973      "src/arm64/assembler-arm64-inl.h",
1974      "src/arm64/assembler-arm64.cc",
1975      "src/arm64/assembler-arm64.h",
1976      "src/arm64/code-stubs-arm64.cc",
1977      "src/arm64/code-stubs-arm64.h",
1978      "src/arm64/codegen-arm64.cc",
1979      "src/arm64/codegen-arm64.h",
1980      "src/arm64/constants-arm64.h",
1981      "src/arm64/cpu-arm64.cc",
1982      "src/arm64/decoder-arm64-inl.h",
1983      "src/arm64/decoder-arm64.cc",
1984      "src/arm64/decoder-arm64.h",
1985      "src/arm64/deoptimizer-arm64.cc",
1986      "src/arm64/disasm-arm64.cc",
1987      "src/arm64/disasm-arm64.h",
1988      "src/arm64/eh-frame-arm64.cc",
1989      "src/arm64/frames-arm64.cc",
1990      "src/arm64/frames-arm64.h",
1991      "src/arm64/instructions-arm64.cc",
1992      "src/arm64/instructions-arm64.h",
1993      "src/arm64/instrument-arm64.cc",
1994      "src/arm64/instrument-arm64.h",
1995      "src/arm64/interface-descriptors-arm64.cc",
1996      "src/arm64/interface-descriptors-arm64.h",
1997      "src/arm64/macro-assembler-arm64-inl.h",
1998      "src/arm64/macro-assembler-arm64.cc",
1999      "src/arm64/macro-assembler-arm64.h",
2000      "src/arm64/simulator-arm64.cc",
2001      "src/arm64/simulator-arm64.h",
2002      "src/arm64/utils-arm64.cc",
2003      "src/arm64/utils-arm64.h",
2004      "src/builtins/arm64/builtins-arm64.cc",
2005      "src/compiler/arm64/code-generator-arm64.cc",
2006      "src/compiler/arm64/instruction-codes-arm64.h",
2007      "src/compiler/arm64/instruction-scheduler-arm64.cc",
2008      "src/compiler/arm64/instruction-selector-arm64.cc",
2009      "src/compiler/arm64/unwinding-info-writer-arm64.cc",
2010      "src/compiler/arm64/unwinding-info-writer-arm64.h",
2011      "src/crankshaft/arm64/delayed-masm-arm64-inl.h",
2012      "src/crankshaft/arm64/delayed-masm-arm64.cc",
2013      "src/crankshaft/arm64/delayed-masm-arm64.h",
2014      "src/crankshaft/arm64/lithium-arm64.cc",
2015      "src/crankshaft/arm64/lithium-arm64.h",
2016      "src/crankshaft/arm64/lithium-codegen-arm64.cc",
2017      "src/crankshaft/arm64/lithium-codegen-arm64.h",
2018      "src/crankshaft/arm64/lithium-gap-resolver-arm64.cc",
2019      "src/crankshaft/arm64/lithium-gap-resolver-arm64.h",
2020      "src/debug/arm64/debug-arm64.cc",
2021      "src/full-codegen/arm64/full-codegen-arm64.cc",
2022      "src/ic/arm64/access-compiler-arm64.cc",
2023      "src/ic/arm64/handler-compiler-arm64.cc",
2024      "src/ic/arm64/ic-arm64.cc",
2025      "src/regexp/arm64/regexp-macro-assembler-arm64.cc",
2026      "src/regexp/arm64/regexp-macro-assembler-arm64.h",
2027    ]
2028  } else if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel") {
2029    sources += [  ### gcmole(arch:mipsel) ###
2030      "src/builtins/mips/builtins-mips.cc",
2031      "src/compiler/mips/code-generator-mips.cc",
2032      "src/compiler/mips/instruction-codes-mips.h",
2033      "src/compiler/mips/instruction-scheduler-mips.cc",
2034      "src/compiler/mips/instruction-selector-mips.cc",
2035      "src/crankshaft/mips/lithium-codegen-mips.cc",
2036      "src/crankshaft/mips/lithium-codegen-mips.h",
2037      "src/crankshaft/mips/lithium-gap-resolver-mips.cc",
2038      "src/crankshaft/mips/lithium-gap-resolver-mips.h",
2039      "src/crankshaft/mips/lithium-mips.cc",
2040      "src/crankshaft/mips/lithium-mips.h",
2041      "src/debug/mips/debug-mips.cc",
2042      "src/full-codegen/mips/full-codegen-mips.cc",
2043      "src/ic/mips/access-compiler-mips.cc",
2044      "src/ic/mips/handler-compiler-mips.cc",
2045      "src/ic/mips/ic-mips.cc",
2046      "src/mips/assembler-mips-inl.h",
2047      "src/mips/assembler-mips.cc",
2048      "src/mips/assembler-mips.h",
2049      "src/mips/code-stubs-mips.cc",
2050      "src/mips/code-stubs-mips.h",
2051      "src/mips/codegen-mips.cc",
2052      "src/mips/codegen-mips.h",
2053      "src/mips/constants-mips.cc",
2054      "src/mips/constants-mips.h",
2055      "src/mips/cpu-mips.cc",
2056      "src/mips/deoptimizer-mips.cc",
2057      "src/mips/disasm-mips.cc",
2058      "src/mips/frames-mips.cc",
2059      "src/mips/frames-mips.h",
2060      "src/mips/interface-descriptors-mips.cc",
2061      "src/mips/macro-assembler-mips.cc",
2062      "src/mips/macro-assembler-mips.h",
2063      "src/mips/simulator-mips.cc",
2064      "src/mips/simulator-mips.h",
2065      "src/regexp/mips/regexp-macro-assembler-mips.cc",
2066      "src/regexp/mips/regexp-macro-assembler-mips.h",
2067    ]
2068  } else if (v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") {
2069    sources += [  ### gcmole(arch:mips64el) ###
2070      "src/builtins/mips64/builtins-mips64.cc",
2071      "src/compiler/mips64/code-generator-mips64.cc",
2072      "src/compiler/mips64/instruction-codes-mips64.h",
2073      "src/compiler/mips64/instruction-scheduler-mips64.cc",
2074      "src/compiler/mips64/instruction-selector-mips64.cc",
2075      "src/crankshaft/mips64/lithium-codegen-mips64.cc",
2076      "src/crankshaft/mips64/lithium-codegen-mips64.h",
2077      "src/crankshaft/mips64/lithium-gap-resolver-mips64.cc",
2078      "src/crankshaft/mips64/lithium-gap-resolver-mips64.h",
2079      "src/crankshaft/mips64/lithium-mips64.cc",
2080      "src/crankshaft/mips64/lithium-mips64.h",
2081      "src/debug/mips64/debug-mips64.cc",
2082      "src/full-codegen/mips64/full-codegen-mips64.cc",
2083      "src/ic/mips64/access-compiler-mips64.cc",
2084      "src/ic/mips64/handler-compiler-mips64.cc",
2085      "src/ic/mips64/ic-mips64.cc",
2086      "src/mips64/assembler-mips64-inl.h",
2087      "src/mips64/assembler-mips64.cc",
2088      "src/mips64/assembler-mips64.h",
2089      "src/mips64/code-stubs-mips64.cc",
2090      "src/mips64/code-stubs-mips64.h",
2091      "src/mips64/codegen-mips64.cc",
2092      "src/mips64/codegen-mips64.h",
2093      "src/mips64/constants-mips64.cc",
2094      "src/mips64/constants-mips64.h",
2095      "src/mips64/cpu-mips64.cc",
2096      "src/mips64/deoptimizer-mips64.cc",
2097      "src/mips64/disasm-mips64.cc",
2098      "src/mips64/frames-mips64.cc",
2099      "src/mips64/frames-mips64.h",
2100      "src/mips64/interface-descriptors-mips64.cc",
2101      "src/mips64/macro-assembler-mips64.cc",
2102      "src/mips64/macro-assembler-mips64.h",
2103      "src/mips64/simulator-mips64.cc",
2104      "src/mips64/simulator-mips64.h",
2105      "src/regexp/mips64/regexp-macro-assembler-mips64.cc",
2106      "src/regexp/mips64/regexp-macro-assembler-mips64.h",
2107    ]
2108  } else if (v8_current_cpu == "ppc" || v8_current_cpu == "ppc64") {
2109    sources += [  ### gcmole(arch:ppc) ###
2110      "src/builtins/ppc/builtins-ppc.cc",
2111      "src/compiler/ppc/code-generator-ppc.cc",
2112      "src/compiler/ppc/instruction-codes-ppc.h",
2113      "src/compiler/ppc/instruction-scheduler-ppc.cc",
2114      "src/compiler/ppc/instruction-selector-ppc.cc",
2115      "src/crankshaft/ppc/lithium-codegen-ppc.cc",
2116      "src/crankshaft/ppc/lithium-codegen-ppc.h",
2117      "src/crankshaft/ppc/lithium-gap-resolver-ppc.cc",
2118      "src/crankshaft/ppc/lithium-gap-resolver-ppc.h",
2119      "src/crankshaft/ppc/lithium-ppc.cc",
2120      "src/crankshaft/ppc/lithium-ppc.h",
2121      "src/debug/ppc/debug-ppc.cc",
2122      "src/full-codegen/ppc/full-codegen-ppc.cc",
2123      "src/ic/ppc/access-compiler-ppc.cc",
2124      "src/ic/ppc/handler-compiler-ppc.cc",
2125      "src/ic/ppc/ic-ppc.cc",
2126      "src/ppc/assembler-ppc-inl.h",
2127      "src/ppc/assembler-ppc.cc",
2128      "src/ppc/assembler-ppc.h",
2129      "src/ppc/code-stubs-ppc.cc",
2130      "src/ppc/code-stubs-ppc.h",
2131      "src/ppc/codegen-ppc.cc",
2132      "src/ppc/codegen-ppc.h",
2133      "src/ppc/constants-ppc.cc",
2134      "src/ppc/constants-ppc.h",
2135      "src/ppc/cpu-ppc.cc",
2136      "src/ppc/deoptimizer-ppc.cc",
2137      "src/ppc/disasm-ppc.cc",
2138      "src/ppc/frames-ppc.cc",
2139      "src/ppc/frames-ppc.h",
2140      "src/ppc/interface-descriptors-ppc.cc",
2141      "src/ppc/macro-assembler-ppc.cc",
2142      "src/ppc/macro-assembler-ppc.h",
2143      "src/ppc/simulator-ppc.cc",
2144      "src/ppc/simulator-ppc.h",
2145      "src/regexp/ppc/regexp-macro-assembler-ppc.cc",
2146      "src/regexp/ppc/regexp-macro-assembler-ppc.h",
2147    ]
2148  } else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") {
2149    sources += [  ### gcmole(arch:s390) ###
2150      "src/builtins/s390/builtins-s390.cc",
2151      "src/compiler/s390/code-generator-s390.cc",
2152      "src/compiler/s390/instruction-codes-s390.h",
2153      "src/compiler/s390/instruction-scheduler-s390.cc",
2154      "src/compiler/s390/instruction-selector-s390.cc",
2155      "src/crankshaft/s390/lithium-codegen-s390.cc",
2156      "src/crankshaft/s390/lithium-codegen-s390.h",
2157      "src/crankshaft/s390/lithium-gap-resolver-s390.cc",
2158      "src/crankshaft/s390/lithium-gap-resolver-s390.h",
2159      "src/crankshaft/s390/lithium-s390.cc",
2160      "src/crankshaft/s390/lithium-s390.h",
2161      "src/debug/s390/debug-s390.cc",
2162      "src/full-codegen/s390/full-codegen-s390.cc",
2163      "src/ic/s390/access-compiler-s390.cc",
2164      "src/ic/s390/handler-compiler-s390.cc",
2165      "src/ic/s390/ic-s390.cc",
2166      "src/regexp/s390/regexp-macro-assembler-s390.cc",
2167      "src/regexp/s390/regexp-macro-assembler-s390.h",
2168      "src/s390/assembler-s390-inl.h",
2169      "src/s390/assembler-s390.cc",
2170      "src/s390/assembler-s390.h",
2171      "src/s390/code-stubs-s390.cc",
2172      "src/s390/code-stubs-s390.h",
2173      "src/s390/codegen-s390.cc",
2174      "src/s390/codegen-s390.h",
2175      "src/s390/constants-s390.cc",
2176      "src/s390/constants-s390.h",
2177      "src/s390/cpu-s390.cc",
2178      "src/s390/deoptimizer-s390.cc",
2179      "src/s390/disasm-s390.cc",
2180      "src/s390/frames-s390.cc",
2181      "src/s390/frames-s390.h",
2182      "src/s390/interface-descriptors-s390.cc",
2183      "src/s390/macro-assembler-s390.cc",
2184      "src/s390/macro-assembler-s390.h",
2185      "src/s390/simulator-s390.cc",
2186      "src/s390/simulator-s390.h",
2187    ]
2188  } else if (v8_current_cpu == "x87") {
2189    sources += [  ### gcmole(arch:x87) ###
2190      "src/builtins/x87/builtins-x87.cc",
2191      "src/compiler/x87/code-generator-x87.cc",
2192      "src/compiler/x87/instruction-codes-x87.h",
2193      "src/compiler/x87/instruction-scheduler-x87.cc",
2194      "src/compiler/x87/instruction-selector-x87.cc",
2195      "src/crankshaft/x87/lithium-codegen-x87.cc",
2196      "src/crankshaft/x87/lithium-codegen-x87.h",
2197      "src/crankshaft/x87/lithium-gap-resolver-x87.cc",
2198      "src/crankshaft/x87/lithium-gap-resolver-x87.h",
2199      "src/crankshaft/x87/lithium-x87.cc",
2200      "src/crankshaft/x87/lithium-x87.h",
2201      "src/debug/x87/debug-x87.cc",
2202      "src/full-codegen/x87/full-codegen-x87.cc",
2203      "src/ic/x87/access-compiler-x87.cc",
2204      "src/ic/x87/handler-compiler-x87.cc",
2205      "src/ic/x87/ic-x87.cc",
2206      "src/regexp/x87/regexp-macro-assembler-x87.cc",
2207      "src/regexp/x87/regexp-macro-assembler-x87.h",
2208      "src/x87/assembler-x87-inl.h",
2209      "src/x87/assembler-x87.cc",
2210      "src/x87/assembler-x87.h",
2211      "src/x87/code-stubs-x87.cc",
2212      "src/x87/code-stubs-x87.h",
2213      "src/x87/codegen-x87.cc",
2214      "src/x87/codegen-x87.h",
2215      "src/x87/cpu-x87.cc",
2216      "src/x87/deoptimizer-x87.cc",
2217      "src/x87/disasm-x87.cc",
2218      "src/x87/frames-x87.cc",
2219      "src/x87/frames-x87.h",
2220      "src/x87/interface-descriptors-x87.cc",
2221      "src/x87/macro-assembler-x87.cc",
2222      "src/x87/macro-assembler-x87.h",
2223      "src/x87/simulator-x87.cc",
2224      "src/x87/simulator-x87.h",
2225    ]
2226  }
2227
2228  configs = [ ":internal_config" ]
2229
2230  defines = []
2231  deps = [
2232    ":v8_libbase",
2233    ":v8_libsampler",
2234    ":v8_version",
2235  ]
2236
2237  sources += [ v8_generated_peephole_source ]
2238  deps += [ ":run_mkpeephole" ]
2239
2240  if (is_win) {
2241    # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
2242    cflags = [ "/wd4267" ]
2243  }
2244
2245  if (v8_enable_i18n_support) {
2246    deps += [ "//third_party/icu" ]
2247    if (is_win) {
2248      deps += [ "//third_party/icu:icudata" ]
2249    }
2250  } else {
2251    sources -= [
2252      "src/i18n.cc",
2253      "src/i18n.h",
2254    ]
2255  }
2256
2257  if (v8_postmortem_support) {
2258    sources += [ "$target_gen_dir/debug-support.cc" ]
2259    deps += [ ":postmortem-metadata" ]
2260  }
2261
2262  if (v8_enable_inspector) {
2263    deps += [ "src/inspector:inspector" ]
2264  }
2265}
2266
2267v8_component("v8_libbase") {
2268  sources = [
2269    "src/base/adapters.h",
2270    "src/base/atomic-utils.h",
2271    "src/base/atomicops.h",
2272    "src/base/atomicops_internals_atomicword_compat.h",
2273    "src/base/atomicops_internals_portable.h",
2274    "src/base/atomicops_internals_x86_msvc.h",
2275    "src/base/base-export.h",
2276    "src/base/bits.cc",
2277    "src/base/bits.h",
2278    "src/base/build_config.h",
2279    "src/base/compiler-specific.h",
2280    "src/base/cpu.cc",
2281    "src/base/cpu.h",
2282    "src/base/debug/stack_trace.cc",
2283    "src/base/debug/stack_trace.h",
2284    "src/base/division-by-constant.cc",
2285    "src/base/division-by-constant.h",
2286    "src/base/file-utils.cc",
2287    "src/base/file-utils.h",
2288    "src/base/flags.h",
2289    "src/base/format-macros.h",
2290    "src/base/free_deleter.h",
2291    "src/base/functional.cc",
2292    "src/base/functional.h",
2293    "src/base/hashmap-entry.h",
2294    "src/base/hashmap.h",
2295    "src/base/ieee754.cc",
2296    "src/base/ieee754.h",
2297    "src/base/iterator.h",
2298    "src/base/lazy-instance.h",
2299    "src/base/logging.cc",
2300    "src/base/logging.h",
2301    "src/base/macros.h",
2302    "src/base/once.cc",
2303    "src/base/once.h",
2304    "src/base/platform/condition-variable.cc",
2305    "src/base/platform/condition-variable.h",
2306    "src/base/platform/elapsed-timer.h",
2307    "src/base/platform/mutex.cc",
2308    "src/base/platform/mutex.h",
2309    "src/base/platform/platform.h",
2310    "src/base/platform/semaphore.cc",
2311    "src/base/platform/semaphore.h",
2312    "src/base/platform/time.cc",
2313    "src/base/platform/time.h",
2314    "src/base/ring-buffer.h",
2315    "src/base/safe_conversions.h",
2316    "src/base/safe_conversions_impl.h",
2317    "src/base/safe_math.h",
2318    "src/base/safe_math_impl.h",
2319    "src/base/sys-info.cc",
2320    "src/base/sys-info.h",
2321    "src/base/utils/random-number-generator.cc",
2322    "src/base/utils/random-number-generator.h",
2323  ]
2324
2325  configs = [ ":internal_config_base" ]
2326
2327  public_configs = [ ":libbase_config" ]
2328
2329  defines = []
2330
2331  if (is_component_build) {
2332    defines = [ "BUILDING_V8_BASE_SHARED" ]
2333  }
2334
2335  if (is_posix) {
2336    sources += [ "src/base/platform/platform-posix.cc" ]
2337  }
2338
2339  if (is_linux) {
2340    sources += [
2341      "src/base/debug/stack_trace_posix.cc",
2342      "src/base/platform/platform-linux.cc",
2343    ]
2344
2345    libs = [
2346      "dl",
2347      "rt",
2348    ]
2349  } else if (is_android) {
2350    if (current_toolchain == host_toolchain) {
2351      libs = [
2352        "dl",
2353        "rt",
2354      ]
2355      if (host_os == "mac") {
2356        sources += [
2357          "src/base/debug/stack_trace_posix.cc",
2358          "src/base/platform/platform-macos.cc",
2359        ]
2360      } else {
2361        sources += [
2362          "src/base/debug/stack_trace_posix.cc",
2363          "src/base/platform/platform-linux.cc",
2364        ]
2365      }
2366    } else {
2367      sources += [
2368        "src/base/debug/stack_trace_android.cc",
2369        "src/base/platform/platform-linux.cc",
2370      ]
2371    }
2372  } else if (is_mac) {
2373    sources += [
2374      "src/base/debug/stack_trace_posix.cc",
2375      "src/base/platform/platform-macos.cc",
2376    ]
2377  } else if (is_win) {
2378    # TODO(jochen): Add support for cygwin.
2379    sources += [
2380      "src/base/debug/stack_trace_win.cc",
2381      "src/base/platform/platform-win32.cc",
2382      "src/base/win32-headers.h",
2383    ]
2384
2385    defines += [ "_CRT_RAND_S" ]  # for rand_s()
2386
2387    libs = [
2388      "dbghelp.lib",
2389      "shlwapi.lib",
2390      "winmm.lib",
2391      "ws2_32.lib",
2392    ]
2393  }
2394
2395  # TODO(jochen): Add support for qnx, freebsd, openbsd, netbsd, and solaris.
2396}
2397
2398v8_component("v8_libplatform") {
2399  sources = [
2400    "//base/trace_event/common/trace_event_common.h",
2401    "include/libplatform/libplatform-export.h",
2402    "include/libplatform/libplatform.h",
2403    "include/libplatform/v8-tracing.h",
2404    "src/libplatform/default-platform.cc",
2405    "src/libplatform/default-platform.h",
2406    "src/libplatform/task-queue.cc",
2407    "src/libplatform/task-queue.h",
2408    "src/libplatform/tracing/trace-buffer.cc",
2409    "src/libplatform/tracing/trace-buffer.h",
2410    "src/libplatform/tracing/trace-config.cc",
2411    "src/libplatform/tracing/trace-object.cc",
2412    "src/libplatform/tracing/trace-writer.cc",
2413    "src/libplatform/tracing/trace-writer.h",
2414    "src/libplatform/tracing/tracing-controller.cc",
2415    "src/libplatform/worker-thread.cc",
2416    "src/libplatform/worker-thread.h",
2417  ]
2418
2419  configs = [ ":internal_config_base" ]
2420
2421  if (is_component_build) {
2422    defines = [ "BUILDING_V8_PLATFORM_SHARED" ]
2423  }
2424
2425  public_configs = [ ":libplatform_config" ]
2426
2427  deps = [
2428    ":v8_libbase",
2429  ]
2430}
2431
2432v8_source_set("v8_libsampler") {
2433  sources = [
2434    "src/libsampler/sampler.cc",
2435    "src/libsampler/sampler.h",
2436  ]
2437
2438  configs = [ ":internal_config_base" ]
2439
2440  public_configs = [ ":libsampler_config" ]
2441
2442  deps = [
2443    ":v8_libbase",
2444  ]
2445}
2446
2447v8_source_set("fuzzer_support") {
2448  visibility = [ ":*" ]  # Only targets in this file can depend on this.
2449
2450  sources = [
2451    "test/fuzzer/fuzzer-support.cc",
2452    "test/fuzzer/fuzzer-support.h",
2453  ]
2454
2455  configs = [ ":internal_config_base" ]
2456
2457  deps = [
2458    ":v8",
2459  ]
2460
2461  public_deps = [
2462    ":v8_libbase",
2463    ":v8_libplatform",
2464  ]
2465
2466  if (v8_enable_i18n_support) {
2467    deps += [ "//third_party/icu" ]
2468  }
2469}
2470
2471###############################################################################
2472# Executables
2473#
2474
2475if (current_toolchain == v8_snapshot_toolchain) {
2476  v8_executable("mksnapshot") {
2477    visibility = [ ":*" ]  # Only targets in this file can depend on this.
2478
2479    sources = [
2480      "src/snapshot/mksnapshot.cc",
2481    ]
2482
2483    configs = [ ":internal_config" ]
2484
2485    deps = [
2486      ":v8_base",
2487      ":v8_libbase",
2488      ":v8_libplatform",
2489      ":v8_nosnapshot",
2490      "//build/config/sanitizers:deps",
2491      "//build/win:default_exe_manifest",
2492    ]
2493  }
2494}
2495
2496v8_executable("mkpeephole") {
2497  # mkpeephole needs to be built for the build host so the peephole lookup
2498  # table can built during build. The table depends on the properties of
2499  # bytecodes that are described in bytecodes.{cc,h}.
2500  visibility = [ ":*" ]  # Only targets in this file can depend on this.
2501
2502  sources = [
2503    "src/interpreter/bytecode-operands.cc",
2504    "src/interpreter/bytecode-operands.h",
2505    "src/interpreter/bytecode-peephole-optimizer.h",
2506    "src/interpreter/bytecode-traits.h",
2507    "src/interpreter/bytecodes.cc",
2508    "src/interpreter/bytecodes.h",
2509    "src/interpreter/mkpeephole.cc",
2510  ]
2511
2512  configs = [
2513    ":external_config",
2514    ":internal_config",
2515  ]
2516
2517  deps = [
2518    ":v8_libbase",
2519    "//build/config/sanitizers:deps",
2520    "//build/win:default_exe_manifest",
2521  ]
2522}
2523
2524###############################################################################
2525# Public targets
2526#
2527
2528want_v8_shell =
2529    (current_toolchain == host_toolchain && v8_toolset_for_shell == "host") ||
2530    (current_toolchain == v8_snapshot_toolchain &&
2531     v8_toolset_for_shell == "host") ||
2532    (current_toolchain != host_toolchain && v8_toolset_for_shell == "target")
2533
2534group("gn_all") {
2535  testonly = true
2536
2537  deps = [
2538    ":d8",
2539    ":v8_fuzzers",
2540    ":v8_hello_world",
2541    ":v8_parser_shell",
2542    ":v8_sample_process",
2543    "test:gn_all",
2544    "tools:gn_all",
2545  ]
2546
2547  if (want_v8_shell) {
2548    deps += [ ":v8_shell" ]
2549  }
2550
2551  if (v8_test_isolation_mode != "noop") {
2552    deps += [ ":d8_run" ]
2553  }
2554}
2555
2556group("v8_clusterfuzz") {
2557  deps = [
2558    ":d8",
2559  ]
2560
2561  if (v8_multi_arch_build) {
2562    deps += [
2563      ":d8(//build/toolchain/linux:clang_x64)",
2564      ":d8(//build/toolchain/linux:clang_x64_v8_arm64)",
2565      ":d8(//build/toolchain/linux:clang_x86)",
2566      ":d8(//build/toolchain/linux:clang_x86_v8_arm)",
2567    ]
2568  }
2569}
2570
2571group("v8_fuzzers") {
2572  testonly = true
2573  deps = [
2574    ":v8_simple_json_fuzzer",
2575    ":v8_simple_parser_fuzzer",
2576    ":v8_simple_regexp_fuzzer",
2577    ":v8_simple_wasm_asmjs_fuzzer",
2578    ":v8_simple_wasm_call_fuzzer",
2579    ":v8_simple_wasm_code_fuzzer",
2580    ":v8_simple_wasm_data_section_fuzzer",
2581    ":v8_simple_wasm_function_sigs_section_fuzzer",
2582    ":v8_simple_wasm_fuzzer",
2583    ":v8_simple_wasm_globals_section_fuzzer",
2584    ":v8_simple_wasm_imports_section_fuzzer",
2585    ":v8_simple_wasm_memory_section_fuzzer",
2586    ":v8_simple_wasm_names_section_fuzzer",
2587    ":v8_simple_wasm_types_section_fuzzer",
2588  ]
2589}
2590
2591if (is_component_build) {
2592  v8_component("v8") {
2593    sources = [
2594      "src/v8dll-main.cc",
2595    ]
2596
2597    deps = [
2598      ":v8_dump_build_config",
2599    ]
2600
2601    public_deps = [
2602      ":v8_base",
2603      ":v8_maybe_snapshot",
2604    ]
2605
2606    configs = [ ":internal_config" ]
2607
2608    public_configs = [ ":external_config" ]
2609  }
2610} else {
2611  group("v8") {
2612    deps = [
2613      ":v8_dump_build_config",
2614    ]
2615
2616    public_deps = [
2617      ":v8_base",
2618      ":v8_maybe_snapshot",
2619    ]
2620
2621    public_configs = [ ":external_config" ]
2622  }
2623}
2624
2625v8_executable("d8") {
2626  sources = [
2627    "$target_gen_dir/d8-js.cc",
2628    "src/d8.cc",
2629    "src/d8.h",
2630  ]
2631
2632  configs = [
2633    # Note: don't use :internal_config here because this target will get
2634    # the :external_config applied to it by virtue of depending on :v8, and
2635    # you can't have both applied to the same target.
2636    ":internal_config_base",
2637  ]
2638
2639  deps = [
2640    ":d8_js2c",
2641    ":v8",
2642    ":v8_libbase",
2643    ":v8_libplatform",
2644    "//build/config/sanitizers:deps",
2645    "//build/win:default_exe_manifest",
2646  ]
2647
2648  if (is_posix) {
2649    sources += [ "src/d8-posix.cc" ]
2650  } else if (is_win) {
2651    sources += [ "src/d8-windows.cc" ]
2652  }
2653
2654  if (v8_enable_i18n_support) {
2655    deps += [ "//third_party/icu" ]
2656  }
2657
2658  if (v8_correctness_fuzzer) {
2659    deps += [ "tools/foozzie:v8_correctness_fuzzer_resources" ]
2660  }
2661
2662  defines = []
2663  if (v8_enable_inspector) {
2664    defines += [ "V8_INSPECTOR_ENABLED" ]
2665  }
2666
2667  if (v8_enable_vtunejit) {
2668    deps += [ "//src/third_party/vtune:v8_vtune" ]
2669  }
2670}
2671
2672v8_isolate_run("d8") {
2673  deps = [
2674    ":d8",
2675  ]
2676
2677  isolate = "//src/d8.isolate"
2678}
2679
2680v8_executable("v8_hello_world") {
2681  sources = [
2682    "samples/hello-world.cc",
2683  ]
2684
2685  configs = [
2686    # Note: don't use :internal_config here because this target will get
2687    # the :external_config applied to it by virtue of depending on :v8, and
2688    # you can't have both applied to the same target.
2689    ":internal_config_base",
2690  ]
2691
2692  deps = [
2693    ":v8",
2694    ":v8_libbase",
2695    ":v8_libplatform",
2696    "//build/config/sanitizers:deps",
2697    "//build/win:default_exe_manifest",
2698  ]
2699
2700  if (v8_enable_i18n_support) {
2701    deps += [ "//third_party/icu" ]
2702  }
2703}
2704
2705v8_executable("v8_sample_process") {
2706  sources = [
2707    "samples/process.cc",
2708  ]
2709
2710  configs = [
2711    # Note: don't use :internal_config here because this target will get
2712    # the :external_config applied to it by virtue of depending on :v8, and
2713    # you can't have both applied to the same target.
2714    ":internal_config_base",
2715  ]
2716
2717  deps = [
2718    ":v8",
2719    ":v8_libbase",
2720    ":v8_libplatform",
2721    "//build/config/sanitizers:deps",
2722    "//build/win:default_exe_manifest",
2723  ]
2724
2725  if (v8_enable_i18n_support) {
2726    deps += [ "//third_party/icu" ]
2727  }
2728}
2729
2730v8_executable("v8_parser_shell") {
2731  sources = [
2732    "tools/parser-shell.cc",
2733    "tools/shell-utils.h",
2734  ]
2735
2736  configs = [
2737    ":external_config",
2738    ":internal_config_base",
2739  ]
2740
2741  deps = [
2742    ":v8",
2743    ":v8_libbase",
2744    ":v8_libplatform",
2745    "//build/config/sanitizers:deps",
2746    "//build/win:default_exe_manifest",
2747  ]
2748
2749  if (v8_enable_i18n_support) {
2750    deps += [ "//third_party/icu" ]
2751  }
2752}
2753
2754if (want_v8_shell) {
2755  v8_executable("v8_shell") {
2756    sources = [
2757      "samples/shell.cc",
2758    ]
2759
2760    configs = [
2761      # Note: don't use :internal_config here because this target will get
2762      # the :external_config applied to it by virtue of depending on :v8, and
2763      # you can't have both applied to the same target.
2764      ":internal_config_base",
2765    ]
2766
2767    deps = [
2768      ":v8",
2769      ":v8_libbase",
2770      ":v8_libplatform",
2771      "//build/config/sanitizers:deps",
2772      "//build/win:default_exe_manifest",
2773    ]
2774
2775    if (v8_enable_i18n_support) {
2776      deps += [ "//third_party/icu" ]
2777    }
2778  }
2779}
2780
2781template("v8_fuzzer") {
2782  name = target_name
2783  forward_variables_from(invoker, "*")
2784  v8_executable("v8_simple_" + name) {
2785    deps = [
2786      ":" + name,
2787      "//build/config/sanitizers:deps",
2788      "//build/win:default_exe_manifest",
2789    ]
2790
2791    sources = [
2792      "test/fuzzer/fuzzer.cc",
2793    ]
2794
2795    configs = [ ":external_config" ]
2796  }
2797}
2798
2799v8_source_set("json_fuzzer") {
2800  sources = [
2801    "test/fuzzer/json.cc",
2802  ]
2803
2804  deps = [
2805    ":fuzzer_support",
2806  ]
2807
2808  configs = [
2809    ":external_config",
2810    ":internal_config_base",
2811  ]
2812}
2813
2814v8_fuzzer("json_fuzzer") {
2815}
2816
2817v8_source_set("parser_fuzzer") {
2818  sources = [
2819    "test/fuzzer/parser.cc",
2820  ]
2821
2822  deps = [
2823    ":fuzzer_support",
2824  ]
2825
2826  configs = [
2827    ":external_config",
2828    ":internal_config_base",
2829  ]
2830}
2831
2832v8_fuzzer("parser_fuzzer") {
2833}
2834
2835v8_source_set("regexp_fuzzer") {
2836  sources = [
2837    "test/fuzzer/regexp.cc",
2838  ]
2839
2840  deps = [
2841    ":fuzzer_support",
2842  ]
2843
2844  configs = [
2845    ":external_config",
2846    ":internal_config_base",
2847  ]
2848}
2849
2850v8_fuzzer("regexp_fuzzer") {
2851}
2852
2853v8_source_set("wasm_module_runner") {
2854  sources = [
2855    "test/common/wasm/wasm-module-runner.cc",
2856    "test/common/wasm/wasm-module-runner.h",
2857  ]
2858
2859  configs = [
2860    ":external_config",
2861    ":internal_config_base",
2862  ]
2863}
2864
2865v8_source_set("wasm_test_signatures") {
2866  sources = [
2867    "test/common/wasm/test-signatures.h",
2868  ]
2869
2870  configs = [
2871    ":external_config",
2872    ":internal_config_base",
2873  ]
2874}
2875
2876v8_source_set("wasm_fuzzer") {
2877  sources = [
2878    "test/fuzzer/wasm.cc",
2879  ]
2880
2881  deps = [
2882    ":fuzzer_support",
2883    ":wasm_module_runner",
2884  ]
2885
2886  configs = [
2887    ":external_config",
2888    ":internal_config_base",
2889  ]
2890}
2891
2892v8_fuzzer("wasm_fuzzer") {
2893}
2894
2895v8_source_set("wasm_asmjs_fuzzer") {
2896  sources = [
2897    "test/fuzzer/wasm-asmjs.cc",
2898  ]
2899
2900  deps = [
2901    ":fuzzer_support",
2902    ":wasm_module_runner",
2903  ]
2904
2905  configs = [
2906    ":external_config",
2907    ":internal_config_base",
2908  ]
2909}
2910
2911v8_fuzzer("wasm_asmjs_fuzzer") {
2912}
2913
2914v8_source_set("wasm_code_fuzzer") {
2915  sources = [
2916    "test/fuzzer/wasm-code.cc",
2917  ]
2918
2919  deps = [
2920    ":fuzzer_support",
2921    ":wasm_module_runner",
2922    ":wasm_test_signatures",
2923  ]
2924
2925  configs = [
2926    ":external_config",
2927    ":internal_config_base",
2928  ]
2929}
2930
2931v8_fuzzer("wasm_code_fuzzer") {
2932}
2933
2934v8_source_set("wasm_call_fuzzer") {
2935  sources = [
2936    "test/fuzzer/wasm-call.cc",
2937  ]
2938
2939  deps = [
2940    ":fuzzer_support",
2941    ":wasm_module_runner",
2942    ":wasm_test_signatures",
2943  ]
2944
2945  configs = [
2946    ":external_config",
2947    ":internal_config_base",
2948  ]
2949}
2950
2951v8_fuzzer("wasm_call_fuzzer") {
2952}
2953
2954v8_source_set("lib_wasm_section_fuzzer") {
2955  sources = [
2956    "test/fuzzer/wasm-section-fuzzers.cc",
2957    "test/fuzzer/wasm-section-fuzzers.h",
2958  ]
2959
2960  configs = [
2961    ":external_config",
2962    ":internal_config_base",
2963  ]
2964}
2965
2966v8_source_set("wasm_types_section_fuzzer") {
2967  sources = [
2968    "test/fuzzer/wasm-types-section.cc",
2969  ]
2970
2971  deps = [
2972    ":fuzzer_support",
2973    ":lib_wasm_section_fuzzer",
2974    ":wasm_module_runner",
2975  ]
2976
2977  configs = [
2978    ":external_config",
2979    ":internal_config_base",
2980  ]
2981}
2982
2983v8_fuzzer("wasm_types_section_fuzzer") {
2984}
2985
2986v8_source_set("wasm_names_section_fuzzer") {
2987  sources = [
2988    "test/fuzzer/wasm-names-section.cc",
2989  ]
2990
2991  deps = [
2992    ":fuzzer_support",
2993    ":lib_wasm_section_fuzzer",
2994    ":wasm_module_runner",
2995  ]
2996
2997  configs = [
2998    ":external_config",
2999    ":internal_config_base",
3000  ]
3001}
3002
3003v8_fuzzer("wasm_names_section_fuzzer") {
3004}
3005
3006v8_source_set("wasm_globals_section_fuzzer") {
3007  sources = [
3008    "test/fuzzer/wasm-globals-section.cc",
3009  ]
3010
3011  deps = [
3012    ":fuzzer_support",
3013    ":lib_wasm_section_fuzzer",
3014    ":wasm_module_runner",
3015  ]
3016
3017  configs = [
3018    ":external_config",
3019    ":internal_config_base",
3020  ]
3021}
3022
3023v8_fuzzer("wasm_globals_section_fuzzer") {
3024}
3025
3026v8_source_set("wasm_imports_section_fuzzer") {
3027  sources = [
3028    "test/fuzzer/wasm-imports-section.cc",
3029  ]
3030
3031  deps = [
3032    ":fuzzer_support",
3033    ":lib_wasm_section_fuzzer",
3034    ":wasm_module_runner",
3035  ]
3036
3037  configs = [
3038    ":external_config",
3039    ":internal_config_base",
3040  ]
3041}
3042
3043v8_fuzzer("wasm_imports_section_fuzzer") {
3044}
3045
3046v8_source_set("wasm_function_sigs_section_fuzzer") {
3047  sources = [
3048    "test/fuzzer/wasm-function-sigs-section.cc",
3049  ]
3050
3051  deps = [
3052    ":fuzzer_support",
3053    ":lib_wasm_section_fuzzer",
3054    ":wasm_module_runner",
3055  ]
3056
3057  configs = [
3058    ":external_config",
3059    ":internal_config_base",
3060  ]
3061}
3062
3063v8_fuzzer("wasm_function_sigs_section_fuzzer") {
3064}
3065
3066v8_source_set("wasm_memory_section_fuzzer") {
3067  sources = [
3068    "test/fuzzer/wasm-memory-section.cc",
3069  ]
3070
3071  deps = [
3072    ":fuzzer_support",
3073    ":lib_wasm_section_fuzzer",
3074    ":wasm_module_runner",
3075  ]
3076
3077  configs = [
3078    ":external_config",
3079    ":internal_config_base",
3080  ]
3081}
3082
3083v8_fuzzer("wasm_memory_section_fuzzer") {
3084}
3085
3086v8_source_set("wasm_data_section_fuzzer") {
3087  sources = [
3088    "test/fuzzer/wasm-data-section.cc",
3089  ]
3090
3091  deps = [
3092    ":fuzzer_support",
3093    ":lib_wasm_section_fuzzer",
3094    ":wasm_module_runner",
3095  ]
3096
3097  configs = [
3098    ":external_config",
3099    ":internal_config_base",
3100  ]
3101}
3102
3103v8_fuzzer("wasm_data_section_fuzzer") {
3104}
3105
3106v8_source_set("wasm_compile_fuzzer") {
3107  sources = [
3108    "test/fuzzer/wasm-compile.cc",
3109  ]
3110
3111  deps = [
3112    ":fuzzer_support",
3113    ":wasm_module_runner",
3114    ":wasm_test_signatures",
3115  ]
3116
3117  configs = [
3118    ":external_config",
3119    ":internal_config_base",
3120  ]
3121}
3122
3123v8_fuzzer("wasm_compile_fuzzer") {
3124}
3125