deps: update v8 to 4.3.61.21
[platform/upstream/nodejs.git] / deps / v8 / BUILD.gn
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import("//build/config/android/config.gni")
6 import("//build/config/arm.gni")
7 import("//build/config/mips.gni")
8
9 # Because standalone V8 builds are not supported, assume this is part of a
10 # Chromium build.
11 import("//build/module_args/v8.gni")
12
13 # TODO(jochen): These will need to be user-settable to support standalone V8
14 # builds.
15 v8_deprecation_warnings = false
16 v8_enable_disassembler = false
17 v8_enable_gdbjit = false
18 v8_enable_handle_zapping = true
19 v8_enable_i18n_support = true
20 v8_enable_verify_heap = false
21 v8_interpreted_regexp = false
22 v8_object_print = false
23 v8_postmortem_support = false
24 v8_use_snapshot = true
25 v8_target_arch = target_cpu
26 v8_random_seed = "314159265"
27 v8_toolset_for_d8 = "host"
28
29 # The snapshot needs to be compiled for the host, but compiled with
30 # a toolchain that matches the bit-width of the target.
31 #
32 # TODO(GYP): For now we only support 32-bit little-endian target builds from an
33 # x64 Linux host. Eventually we need to support all of the host/target
34 # configurations v8 runs on.
35 if (host_cpu == "x64" && host_os == "linux" &&
36     (target_cpu == "arm" || target_cpu == "mipsel" || target_cpu == "x86")) {
37   snapshot_toolchain = "//build/toolchain/linux:clang_x86"
38 } else {
39   snapshot_toolchain = default_toolchain
40 }
41
42 ###############################################################################
43 # Configurations
44 #
45 config("internal_config") {
46   visibility = [ ":*" ]  # Only targets in this file can depend on this.
47
48   include_dirs = [ "." ]
49
50   if (component_mode == "shared_library") {
51     defines = [
52       "V8_SHARED",
53       "BUILDING_V8_SHARED",
54     ]
55   }
56 }
57
58 config("internal_config_base") {
59   visibility = [ ":*" ]  # Only targets in this file can depend on this.
60
61   include_dirs = [ "." ]
62 }
63
64 # This config should only be applied to code using V8 and not any V8 code
65 # itself.
66 config("external_config") {
67   if (is_component_build) {
68     defines = [
69       "V8_SHARED",
70       "USING_V8_SHARED",
71     ]
72   }
73   include_dirs = [ "include" ]
74 }
75
76 config("features") {
77   visibility = [ ":*" ]  # Only targets in this file can depend on this.
78
79   defines = []
80
81   if (v8_enable_disassembler == true) {
82     defines += [ "ENABLE_DISASSEMBLER" ]
83   }
84   if (v8_enable_gdbjit == true) {
85     defines += [ "ENABLE_GDB_JIT_INTERFACE" ]
86   }
87   if (v8_object_print == true) {
88     defines += [ "OBJECT_PRINT" ]
89   }
90   if (v8_enable_verify_heap == true) {
91     defines += [ "VERIFY_HEAP" ]
92   }
93   if (v8_interpreted_regexp == true) {
94     defines += [ "V8_INTERPRETED_REGEXP" ]
95   }
96   if (v8_deprecation_warnings == true) {
97     defines += [ "V8_DEPRECATION_WARNINGS" ]
98   }
99   if (v8_enable_i18n_support == true) {
100     defines += [ "V8_I18N_SUPPORT" ]
101   }
102   if (v8_enable_handle_zapping == true) {
103     defines += [ "ENABLE_HANDLE_ZAPPING" ]
104   }
105   if (v8_use_external_startup_data == true) {
106     defines += [ "V8_USE_EXTERNAL_STARTUP_DATA" ]
107   }
108 }
109
110 config("toolchain") {
111   visibility = [ ":*" ]  # Only targets in this file can depend on this.
112
113   defines = []
114   cflags = []
115
116   # TODO(jochen): Add support for arm subarchs, mips, mipsel, mips64el.
117
118   if (v8_target_arch == "arm") {
119     defines += [ "V8_TARGET_ARCH_ARM" ]
120     if (current_cpu == "arm") {
121       if (arm_version == 7) {
122         defines += [ "CAN_USE_ARMV7_INSTRUCTIONS" ]
123       }
124       if (arm_fpu == "vfpv3-d16") {
125         defines += [ "CAN_USE_VFP3_INSTRUCTIONS" ]
126       } else if (arm_fpu == "vfpv3") {
127         defines += [
128           "CAN_USE_VFP3_INSTRUCTIONS",
129           "CAN_USE_VFP32DREGS",
130         ]
131       } else if (arm_fpu == "neon") {
132         defines += [
133           "CAN_USE_VFP3_INSTRUCTIONS",
134           "CAN_USE_VFP32DREGS",
135           "CAN_USE_NEON",
136         ]
137       }
138     } else {
139       # These defines ares used for the ARM simulator.
140       defines += [
141         "CAN_USE_ARMV7_INSTRUCTIONS",
142         "CAN_USE_VFP3_INSTRUCTIONS",
143         "CAN_USE_VFP32DREGS",
144         "USE_EABI_HARDFLOAT=0",
145       ]
146     }
147
148     # TODO(jochen): Add support for arm_test_noprobe.
149   }
150   if (v8_target_arch == "arm64") {
151     defines += [ "V8_TARGET_ARCH_ARM64" ]
152   }
153   if (v8_target_arch == "mipsel") {
154     defines += [ "V8_TARGET_ARCH_MIPS" ]
155   }
156   if (v8_target_arch == "mips64el") {
157     defines += [ "V8_TARGET_ARCH_MIPS64" ]
158   }
159   if (v8_target_arch == "x86") {
160     defines += [ "V8_TARGET_ARCH_IA32" ]
161   }
162   if (v8_target_arch == "x64") {
163     defines += [ "V8_TARGET_ARCH_X64" ]
164   }
165   if (is_win) {
166     defines += [ "WIN32" ]
167     # TODO(jochen): Support v8_enable_prof.
168   }
169
170   # TODO(jochen): Add support for compiling with simulators.
171
172   if (is_debug) {
173     # TODO(jochen): Add support for different debug optimization levels.
174     defines += [
175       "ENABLE_DISASSEMBLER",
176       "V8_ENABLE_CHECKS",
177       "OBJECT_PRINT",
178       "VERIFY_HEAP",
179       "DEBUG",
180       "OPTIMIZED_DEBUG",
181     ]
182   }
183 }
184
185 ###############################################################################
186 # Actions
187 #
188
189 action("js2c") {
190   visibility = [ ":*" ]  # Only targets in this file can depend on this.
191
192   script = "tools/js2c.py"
193
194   # The script depends on this other script, this rule causes a rebuild if it
195   # changes.
196   inputs = [ "tools/jsmin.py" ]
197
198   sources = [
199     "src/runtime.js",
200     "src/v8natives.js",
201     "src/symbol.js",
202     "src/array.js",
203     "src/string.js",
204     "src/uri.js",
205     "src/math.js",
206     "src/third_party/fdlibm/fdlibm.js",
207     "src/date.js",
208     "src/regexp.js",
209     "src/arraybuffer.js",
210     "src/typedarray.js",
211     "src/generator.js",
212     "src/object-observe.js",
213     "src/collection.js",
214     "src/weak-collection.js",
215     "src/collection-iterator.js",
216     "src/promise.js",
217     "src/messages.js",
218     "src/json.js",
219     "src/array-iterator.js",
220     "src/string-iterator.js",
221     "src/debug-debugger.js",
222     "src/mirror-debugger.js",
223     "src/liveedit-debugger.js",
224     "src/templates.js",
225     "src/macros.py",
226   ]
227
228   outputs = [
229     "$target_gen_dir/libraries.cc",
230   ]
231
232   if (v8_enable_i18n_support) {
233     sources += [ "src/i18n.js" ]
234   }
235
236   args = [
237            rebase_path("$target_gen_dir/libraries.cc", root_build_dir),
238            "CORE",
239          ] + rebase_path(sources, root_build_dir)
240
241   if (v8_use_external_startup_data) {
242     outputs += [ "$target_gen_dir/libraries.bin" ]
243     args += [
244       "--startup_blob",
245       rebase_path("$target_gen_dir/libraries.bin", root_build_dir),
246     ]
247   }
248 }
249
250 action("js2c_experimental") {
251   visibility = [ ":*" ]  # Only targets in this file can depend on this.
252
253   script = "tools/js2c.py"
254
255   # The script depends on this other script, this rule causes a rebuild if it
256   # changes.
257   inputs = [ "tools/jsmin.py" ]
258
259   sources = [
260     "src/macros.py",
261     "src/proxy.js",
262     "src/generator.js",
263     "src/harmony-array.js",
264     "src/harmony-array-includes.js",
265     "src/harmony-typedarray.js",
266     "src/harmony-tostring.js",
267     "src/harmony-regexp.js",
268     "src/harmony-reflect.js"
269   ]
270
271   outputs = [
272     "$target_gen_dir/experimental-libraries.cc",
273   ]
274
275   args = [
276            rebase_path("$target_gen_dir/experimental-libraries.cc",
277                        root_build_dir),
278            "EXPERIMENTAL",
279          ] + rebase_path(sources, root_build_dir)
280
281   if (v8_use_external_startup_data) {
282     outputs += [ "$target_gen_dir/libraries_experimental.bin" ]
283     args += [
284       "--startup_blob",
285       rebase_path("$target_gen_dir/libraries_experimental.bin", root_build_dir),
286     ]
287   }
288 }
289
290 action("d8_js2c") {
291   visibility = [ ":*" ]  # Only targets in this file can depend on this.
292
293   script = "tools/js2c.py"
294
295   inputs = [
296     "src/d8.js",
297     "src/macros.py",
298   ]
299
300   outputs = [
301     "$target_gen_dir/d8-js.cc",
302   ]
303
304   args = rebase_path(outputs, root_build_dir) + [ "D8" ] +
305          rebase_path(inputs, root_build_dir)
306 }
307
308 if (v8_use_external_startup_data) {
309   action("natives_blob") {
310     visibility = [ ":*" ]  # Only targets in this file can depend on this.
311
312     deps = [
313       ":js2c",
314       ":js2c_experimental",
315     ]
316
317     sources = [
318       "$target_gen_dir/libraries.bin",
319       "$target_gen_dir/libraries_experimental.bin",
320     ]
321
322     outputs = [
323       "$root_out_dir/natives_blob.bin",
324     ]
325
326     script = "tools/concatenate-files.py"
327
328     args = rebase_path(sources + outputs, root_build_dir)
329   }
330 }
331
332 action("postmortem-metadata") {
333   visibility = [ ":*" ]  # Only targets in this file can depend on this.
334
335   script = "tools/gen-postmortem-metadata.py"
336
337   sources = [
338     "src/objects.h",
339     "src/objects-inl.h",
340   ]
341
342   outputs = [
343     "$target_gen_dir/debug-support.cc",
344   ]
345
346   args = rebase_path(outputs, root_build_dir) +
347          rebase_path(sources, root_build_dir)
348 }
349
350 action("run_mksnapshot") {
351   visibility = [ ":*" ]  # Only targets in this file can depend on this.
352
353   deps = [
354     ":mksnapshot($snapshot_toolchain)",
355   ]
356
357   script = "tools/run.py"
358
359   outputs = [
360     "$target_gen_dir/snapshot.cc",
361   ]
362
363   args = [
364     "./" + rebase_path(get_label_info(":mksnapshot($snapshot_toolchain)",
365                                       "root_out_dir") + "/mksnapshot",
366                        root_build_dir),
367     "--log-snapshot-positions",
368     "--logfile",
369     rebase_path("$target_gen_dir/snapshot.log", root_build_dir),
370     rebase_path("$target_gen_dir/snapshot.cc", root_build_dir),
371   ]
372
373   if (v8_random_seed != "0") {
374     args += [
375       "--random-seed",
376       v8_random_seed,
377     ]
378   }
379
380   if (v8_use_external_startup_data) {
381     outputs += [ "$root_out_dir/snapshot_blob.bin" ]
382     args += [
383       "--startup_blob",
384       rebase_path("$root_out_dir/snapshot_blob.bin", root_build_dir),
385     ]
386   }
387 }
388
389 ###############################################################################
390 # Source Sets (aka static libraries)
391 #
392
393 source_set("v8_nosnapshot") {
394   visibility = [ ":*" ]  # Only targets in this file can depend on this.
395
396   deps = [
397     ":js2c",
398     ":js2c_experimental",
399     ":v8_base",
400   ]
401
402   sources = [
403     "$target_gen_dir/libraries.cc",
404     "$target_gen_dir/experimental-libraries.cc",
405     "src/snapshot/snapshot-empty.cc",
406   ]
407
408   configs -= [ "//build/config/compiler:chromium_code" ]
409   configs += [ "//build/config/compiler:no_chromium_code" ]
410   configs += [
411     ":internal_config",
412     ":features",
413     ":toolchain",
414   ]
415 }
416
417 source_set("v8_snapshot") {
418   visibility = [ ":*" ]  # Only targets in this file can depend on this.
419
420   deps = [
421     ":js2c",
422     ":js2c_experimental",
423     ":run_mksnapshot",
424     ":v8_base",
425   ]
426
427   sources = [
428     "$target_gen_dir/libraries.cc",
429     "$target_gen_dir/experimental-libraries.cc",
430     "$target_gen_dir/snapshot.cc",
431   ]
432
433   configs -= [ "//build/config/compiler:chromium_code" ]
434   configs += [ "//build/config/compiler:no_chromium_code" ]
435   configs += [
436     ":internal_config",
437     ":features",
438     ":toolchain",
439   ]
440 }
441
442 if (v8_use_external_startup_data) {
443   source_set("v8_external_snapshot") {
444     visibility = [ ":*" ]  # Only targets in this file can depend on this.
445
446     deps = [
447       ":js2c",
448       ":js2c_experimental",
449       ":run_mksnapshot",
450       ":v8_base",
451       ":natives_blob",
452     ]
453
454     sources = [
455       "src/snapshot/natives-external.cc",
456       "src/snapshot/snapshot-external.cc",
457     ]
458
459     configs -= [ "//build/config/compiler:chromium_code" ]
460     configs += [ "//build/config/compiler:no_chromium_code" ]
461     configs += [
462       ":internal_config",
463       ":features",
464       ":toolchain",
465     ]
466   }
467 }
468
469 source_set("v8_base") {
470   visibility = [ ":*" ]  # Only targets in this file can depend on this.
471
472   sources = [
473     "src/accessors.cc",
474     "src/accessors.h",
475     "src/allocation.cc",
476     "src/allocation.h",
477     "src/allocation-site-scopes.cc",
478     "src/allocation-site-scopes.h",
479     "src/allocation-tracker.cc",
480     "src/allocation-tracker.h",
481     "src/api.cc",
482     "src/api.h",
483     "src/api-natives.cc",
484     "src/api-natives.h",
485     "src/arguments.cc",
486     "src/arguments.h",
487     "src/assembler.cc",
488     "src/assembler.h",
489     "src/assert-scope.h",
490     "src/assert-scope.cc",
491     "src/ast-numbering.cc",
492     "src/ast-numbering.h",
493     "src/ast-value-factory.cc",
494     "src/ast-value-factory.h",
495     "src/ast.cc",
496     "src/ast.h",
497     "src/background-parsing-task.cc",
498     "src/background-parsing-task.h",
499     "src/bailout-reason.cc",
500     "src/bailout-reason.h",
501     "src/basic-block-profiler.cc",
502     "src/basic-block-profiler.h",
503     "src/bignum-dtoa.cc",
504     "src/bignum-dtoa.h",
505     "src/bignum.cc",
506     "src/bignum.h",
507     "src/bit-vector.cc",
508     "src/bit-vector.h",
509     "src/bootstrapper.cc",
510     "src/bootstrapper.h",
511     "src/builtins.cc",
512     "src/builtins.h",
513     "src/bytecodes-irregexp.h",
514     "src/cached-powers.cc",
515     "src/cached-powers.h",
516     "src/char-predicates.cc",
517     "src/char-predicates-inl.h",
518     "src/char-predicates.h",
519     "src/checks.cc",
520     "src/checks.h",
521     "src/circular-queue-inl.h",
522     "src/circular-queue.h",
523     "src/code-factory.cc",
524     "src/code-factory.h",
525     "src/code-stubs.cc",
526     "src/code-stubs.h",
527     "src/code-stubs-hydrogen.cc",
528     "src/code.h",
529     "src/codegen.cc",
530     "src/codegen.h",
531     "src/compilation-cache.cc",
532     "src/compilation-cache.h",
533     "src/compilation-statistics.cc",
534     "src/compilation-statistics.h",
535     "src/compiler/access-builder.cc",
536     "src/compiler/access-builder.h",
537     "src/compiler/all-nodes.cc",
538     "src/compiler/all-nodes.h",
539     "src/compiler/ast-graph-builder.cc",
540     "src/compiler/ast-graph-builder.h",
541     "src/compiler/ast-loop-assignment-analyzer.cc",
542     "src/compiler/ast-loop-assignment-analyzer.h",
543     "src/compiler/basic-block-instrumentor.cc",
544     "src/compiler/basic-block-instrumentor.h",
545     "src/compiler/change-lowering.cc",
546     "src/compiler/change-lowering.h",
547     "src/compiler/code-generator-impl.h",
548     "src/compiler/code-generator.cc",
549     "src/compiler/code-generator.h",
550     "src/compiler/common-node-cache.cc",
551     "src/compiler/common-node-cache.h",
552     "src/compiler/common-operator-reducer.cc",
553     "src/compiler/common-operator-reducer.h",
554     "src/compiler/common-operator.cc",
555     "src/compiler/common-operator.h",
556     "src/compiler/control-builders.cc",
557     "src/compiler/control-builders.h",
558     "src/compiler/control-equivalence.h",
559     "src/compiler/control-flow-optimizer.cc",
560     "src/compiler/control-flow-optimizer.h",
561     "src/compiler/control-reducer.cc",
562     "src/compiler/control-reducer.h",
563     "src/compiler/diamond.h",
564     "src/compiler/frame.h",
565     "src/compiler/gap-resolver.cc",
566     "src/compiler/gap-resolver.h",
567     "src/compiler/graph-builder.h",
568     "src/compiler/graph-reducer.cc",
569     "src/compiler/graph-reducer.h",
570     "src/compiler/graph-replay.cc",
571     "src/compiler/graph-replay.h",
572     "src/compiler/graph-visualizer.cc",
573     "src/compiler/graph-visualizer.h",
574     "src/compiler/graph.cc",
575     "src/compiler/graph.h",
576     "src/compiler/instruction-codes.h",
577     "src/compiler/instruction-selector-impl.h",
578     "src/compiler/instruction-selector.cc",
579     "src/compiler/instruction-selector.h",
580     "src/compiler/instruction.cc",
581     "src/compiler/instruction.h",
582     "src/compiler/js-builtin-reducer.cc",
583     "src/compiler/js-builtin-reducer.h",
584     "src/compiler/js-context-specialization.cc",
585     "src/compiler/js-context-specialization.h",
586     "src/compiler/js-generic-lowering.cc",
587     "src/compiler/js-generic-lowering.h",
588     "src/compiler/js-graph.cc",
589     "src/compiler/js-graph.h",
590     "src/compiler/js-inlining.cc",
591     "src/compiler/js-inlining.h",
592     "src/compiler/js-intrinsic-lowering.cc",
593     "src/compiler/js-intrinsic-lowering.h",
594     "src/compiler/js-operator.cc",
595     "src/compiler/js-operator.h",
596     "src/compiler/js-type-feedback.cc",
597     "src/compiler/js-type-feedback.h",
598     "src/compiler/js-typed-lowering.cc",
599     "src/compiler/js-typed-lowering.h",
600     "src/compiler/jump-threading.cc",
601     "src/compiler/jump-threading.h",
602     "src/compiler/linkage-impl.h",
603     "src/compiler/linkage.cc",
604     "src/compiler/linkage.h",
605     "src/compiler/liveness-analyzer.cc",
606     "src/compiler/liveness-analyzer.h",
607     "src/compiler/load-elimination.cc",
608     "src/compiler/load-elimination.h",
609     "src/compiler/loop-peeling.cc",
610     "src/compiler/loop-analysis.cc",
611     "src/compiler/loop-analysis.h",
612     "src/compiler/machine-operator-reducer.cc",
613     "src/compiler/machine-operator-reducer.h",
614     "src/compiler/machine-operator.cc",
615     "src/compiler/machine-operator.h",
616     "src/compiler/machine-type.cc",
617     "src/compiler/machine-type.h",
618     "src/compiler/move-optimizer.cc",
619     "src/compiler/move-optimizer.h",
620     "src/compiler/node-aux-data.h",
621     "src/compiler/node-cache.cc",
622     "src/compiler/node-cache.h",
623     "src/compiler/node-marker.cc",
624     "src/compiler/node-marker.h",
625     "src/compiler/node-matchers.cc",
626     "src/compiler/node-matchers.h",
627     "src/compiler/node-properties.cc",
628     "src/compiler/node-properties.h",
629     "src/compiler/node.cc",
630     "src/compiler/node.h",
631     "src/compiler/opcodes.cc",
632     "src/compiler/opcodes.h",
633     "src/compiler/operator-properties.cc",
634     "src/compiler/operator-properties.h",
635     "src/compiler/operator.cc",
636     "src/compiler/operator.h",
637     "src/compiler/osr.cc",
638     "src/compiler/osr.h",
639     "src/compiler/pipeline.cc",
640     "src/compiler/pipeline.h",
641     "src/compiler/pipeline-statistics.cc",
642     "src/compiler/pipeline-statistics.h",
643     "src/compiler/raw-machine-assembler.cc",
644     "src/compiler/raw-machine-assembler.h",
645     "src/compiler/register-allocator.cc",
646     "src/compiler/register-allocator.h",
647     "src/compiler/register-allocator-verifier.cc",
648     "src/compiler/register-allocator-verifier.h",
649     "src/compiler/register-configuration.cc",
650     "src/compiler/register-configuration.h",
651     "src/compiler/representation-change.h",
652     "src/compiler/schedule.cc",
653     "src/compiler/schedule.h",
654     "src/compiler/scheduler.cc",
655     "src/compiler/scheduler.h",
656     "src/compiler/select-lowering.cc",
657     "src/compiler/select-lowering.h",
658     "src/compiler/simplified-lowering.cc",
659     "src/compiler/simplified-lowering.h",
660     "src/compiler/simplified-operator-reducer.cc",
661     "src/compiler/simplified-operator-reducer.h",
662     "src/compiler/simplified-operator.cc",
663     "src/compiler/simplified-operator.h",
664     "src/compiler/source-position.cc",
665     "src/compiler/source-position.h",
666     "src/compiler/state-values-utils.cc",
667     "src/compiler/state-values-utils.h",
668     "src/compiler/typer.cc",
669     "src/compiler/typer.h",
670     "src/compiler/value-numbering-reducer.cc",
671     "src/compiler/value-numbering-reducer.h",
672     "src/compiler/verifier.cc",
673     "src/compiler/verifier.h",
674     "src/compiler/zone-pool.cc",
675     "src/compiler/zone-pool.h",
676     "src/compiler.cc",
677     "src/compiler.h",
678     "src/contexts.cc",
679     "src/contexts.h",
680     "src/conversions-inl.h",
681     "src/conversions.cc",
682     "src/conversions.h",
683     "src/counters.cc",
684     "src/counters.h",
685     "src/cpu-profiler-inl.h",
686     "src/cpu-profiler.cc",
687     "src/cpu-profiler.h",
688     "src/date.cc",
689     "src/date.h",
690     "src/dateparser-inl.h",
691     "src/dateparser.cc",
692     "src/dateparser.h",
693     "src/debug.cc",
694     "src/debug.h",
695     "src/deoptimizer.cc",
696     "src/deoptimizer.h",
697     "src/disasm.h",
698     "src/disassembler.cc",
699     "src/disassembler.h",
700     "src/diy-fp.cc",
701     "src/diy-fp.h",
702     "src/double.h",
703     "src/dtoa.cc",
704     "src/dtoa.h",
705     "src/effects.h",
706     "src/elements-kind.cc",
707     "src/elements-kind.h",
708     "src/elements.cc",
709     "src/elements.h",
710     "src/execution.cc",
711     "src/execution.h",
712     "src/extensions/externalize-string-extension.cc",
713     "src/extensions/externalize-string-extension.h",
714     "src/extensions/free-buffer-extension.cc",
715     "src/extensions/free-buffer-extension.h",
716     "src/extensions/gc-extension.cc",
717     "src/extensions/gc-extension.h",
718     "src/extensions/statistics-extension.cc",
719     "src/extensions/statistics-extension.h",
720     "src/extensions/trigger-failure-extension.cc",
721     "src/extensions/trigger-failure-extension.h",
722     "src/factory.cc",
723     "src/factory.h",
724     "src/fast-dtoa.cc",
725     "src/fast-dtoa.h",
726     "src/field-index.h",
727     "src/field-index-inl.h",
728     "src/fixed-dtoa.cc",
729     "src/fixed-dtoa.h",
730     "src/flag-definitions.h",
731     "src/flags.cc",
732     "src/flags.h",
733     "src/frames-inl.h",
734     "src/frames.cc",
735     "src/frames.h",
736     "src/full-codegen.cc",
737     "src/full-codegen.h",
738     "src/func-name-inferrer.cc",
739     "src/func-name-inferrer.h",
740     "src/gdb-jit.cc",
741     "src/gdb-jit.h",
742     "src/global-handles.cc",
743     "src/global-handles.h",
744     "src/globals.h",
745     "src/handles-inl.h",
746     "src/handles.cc",
747     "src/handles.h",
748     "src/hashmap.h",
749     "src/heap-profiler.cc",
750     "src/heap-profiler.h",
751     "src/heap-snapshot-generator-inl.h",
752     "src/heap-snapshot-generator.cc",
753     "src/heap-snapshot-generator.h",
754     "src/heap/gc-idle-time-handler.cc",
755     "src/heap/gc-idle-time-handler.h",
756     "src/heap/gc-tracer.cc",
757     "src/heap/gc-tracer.h",
758     "src/heap/heap-inl.h",
759     "src/heap/heap.cc",
760     "src/heap/heap.h",
761     "src/heap/incremental-marking.cc",
762     "src/heap/incremental-marking.h",
763     "src/heap/mark-compact-inl.h",
764     "src/heap/mark-compact.cc",
765     "src/heap/mark-compact.h",
766     "src/heap/objects-visiting-inl.h",
767     "src/heap/objects-visiting.cc",
768     "src/heap/objects-visiting.h",
769     "src/heap/spaces-inl.h",
770     "src/heap/spaces.cc",
771     "src/heap/spaces.h",
772     "src/heap/store-buffer-inl.h",
773     "src/heap/store-buffer.cc",
774     "src/heap/store-buffer.h",
775     "src/hydrogen-alias-analysis.h",
776     "src/hydrogen-bce.cc",
777     "src/hydrogen-bce.h",
778     "src/hydrogen-bch.cc",
779     "src/hydrogen-bch.h",
780     "src/hydrogen-canonicalize.cc",
781     "src/hydrogen-canonicalize.h",
782     "src/hydrogen-check-elimination.cc",
783     "src/hydrogen-check-elimination.h",
784     "src/hydrogen-dce.cc",
785     "src/hydrogen-dce.h",
786     "src/hydrogen-dehoist.cc",
787     "src/hydrogen-dehoist.h",
788     "src/hydrogen-environment-liveness.cc",
789     "src/hydrogen-environment-liveness.h",
790     "src/hydrogen-escape-analysis.cc",
791     "src/hydrogen-escape-analysis.h",
792     "src/hydrogen-flow-engine.h",
793     "src/hydrogen-instructions.cc",
794     "src/hydrogen-instructions.h",
795     "src/hydrogen.cc",
796     "src/hydrogen.h",
797     "src/hydrogen-gvn.cc",
798     "src/hydrogen-gvn.h",
799     "src/hydrogen-infer-representation.cc",
800     "src/hydrogen-infer-representation.h",
801     "src/hydrogen-infer-types.cc",
802     "src/hydrogen-infer-types.h",
803     "src/hydrogen-load-elimination.cc",
804     "src/hydrogen-load-elimination.h",
805     "src/hydrogen-mark-deoptimize.cc",
806     "src/hydrogen-mark-deoptimize.h",
807     "src/hydrogen-mark-unreachable.cc",
808     "src/hydrogen-mark-unreachable.h",
809     "src/hydrogen-osr.cc",
810     "src/hydrogen-osr.h",
811     "src/hydrogen-range-analysis.cc",
812     "src/hydrogen-range-analysis.h",
813     "src/hydrogen-redundant-phi.cc",
814     "src/hydrogen-redundant-phi.h",
815     "src/hydrogen-removable-simulates.cc",
816     "src/hydrogen-removable-simulates.h",
817     "src/hydrogen-representation-changes.cc",
818     "src/hydrogen-representation-changes.h",
819     "src/hydrogen-sce.cc",
820     "src/hydrogen-sce.h",
821     "src/hydrogen-store-elimination.cc",
822     "src/hydrogen-store-elimination.h",
823     "src/hydrogen-types.cc",
824     "src/hydrogen-types.h",
825     "src/hydrogen-uint32-analysis.cc",
826     "src/hydrogen-uint32-analysis.h",
827     "src/i18n.cc",
828     "src/i18n.h",
829     "src/icu_util.cc",
830     "src/icu_util.h",
831     "src/ic/access-compiler.cc",
832     "src/ic/access-compiler.h",
833     "src/ic/call-optimization.cc",
834     "src/ic/call-optimization.h",
835     "src/ic/handler-compiler.cc",
836     "src/ic/handler-compiler.h",
837     "src/ic/ic-inl.h",
838     "src/ic/ic-state.cc",
839     "src/ic/ic-state.h",
840     "src/ic/ic.cc",
841     "src/ic/ic.h",
842     "src/ic/ic-compiler.cc",
843     "src/ic/ic-compiler.h",
844     "src/ic/stub-cache.cc",
845     "src/ic/stub-cache.h",
846     "src/interface-descriptors.cc",
847     "src/interface-descriptors.h",
848     "src/interpreter-irregexp.cc",
849     "src/interpreter-irregexp.h",
850     "src/isolate.cc",
851     "src/isolate.h",
852     "src/json-parser.h",
853     "src/json-stringifier.h",
854     "src/jsregexp-inl.h",
855     "src/jsregexp.cc",
856     "src/jsregexp.h",
857     "src/layout-descriptor-inl.h",
858     "src/layout-descriptor.cc",
859     "src/layout-descriptor.h",
860     "src/list-inl.h",
861     "src/list.h",
862     "src/lithium-allocator-inl.h",
863     "src/lithium-allocator.cc",
864     "src/lithium-allocator.h",
865     "src/lithium-codegen.cc",
866     "src/lithium-codegen.h",
867     "src/lithium.cc",
868     "src/lithium.h",
869     "src/liveedit.cc",
870     "src/liveedit.h",
871     "src/log-inl.h",
872     "src/log-utils.cc",
873     "src/log-utils.h",
874     "src/log.cc",
875     "src/log.h",
876     "src/lookup-inl.h",
877     "src/lookup.cc",
878     "src/lookup.h",
879     "src/macro-assembler.h",
880     "src/messages.cc",
881     "src/messages.h",
882     "src/modules.cc",
883     "src/modules.h",
884     "src/msan.h",
885     "src/objects-debug.cc",
886     "src/objects-inl.h",
887     "src/objects-printer.cc",
888     "src/objects.cc",
889     "src/objects.h",
890     "src/optimizing-compiler-thread.cc",
891     "src/optimizing-compiler-thread.h",
892     "src/ostreams.cc",
893     "src/ostreams.h",
894     "src/parser.cc",
895     "src/parser.h",
896     "src/pending-compilation-error-handler.cc",
897     "src/pending-compilation-error-handler.h",
898     "src/perf-jit.cc",
899     "src/perf-jit.h",
900     "src/preparse-data-format.h",
901     "src/preparse-data.cc",
902     "src/preparse-data.h",
903     "src/preparser.cc",
904     "src/preparser.h",
905     "src/prettyprinter.cc",
906     "src/prettyprinter.h",
907     "src/profile-generator-inl.h",
908     "src/profile-generator.cc",
909     "src/profile-generator.h",
910     "src/property-details.h",
911     "src/property.cc",
912     "src/property.h",
913     "src/prototype.h",
914     "src/regexp-macro-assembler-irregexp-inl.h",
915     "src/regexp-macro-assembler-irregexp.cc",
916     "src/regexp-macro-assembler-irregexp.h",
917     "src/regexp-macro-assembler-tracer.cc",
918     "src/regexp-macro-assembler-tracer.h",
919     "src/regexp-macro-assembler.cc",
920     "src/regexp-macro-assembler.h",
921     "src/regexp-stack.cc",
922     "src/regexp-stack.h",
923     "src/rewriter.cc",
924     "src/rewriter.h",
925     "src/runtime-profiler.cc",
926     "src/runtime-profiler.h",
927     "src/runtime/runtime-array.cc",
928     "src/runtime/runtime-classes.cc",
929     "src/runtime/runtime-collections.cc",
930     "src/runtime/runtime-compiler.cc",
931     "src/runtime/runtime-date.cc",
932     "src/runtime/runtime-debug.cc",
933     "src/runtime/runtime-function.cc",
934     "src/runtime/runtime-generator.cc",
935     "src/runtime/runtime-i18n.cc",
936     "src/runtime/runtime-internal.cc",
937     "src/runtime/runtime-json.cc",
938     "src/runtime/runtime-literals.cc",
939     "src/runtime/runtime-liveedit.cc",
940     "src/runtime/runtime-maths.cc",
941     "src/runtime/runtime-numbers.cc",
942     "src/runtime/runtime-object.cc",
943     "src/runtime/runtime-observe.cc",
944     "src/runtime/runtime-proxy.cc",
945     "src/runtime/runtime-regexp.cc",
946     "src/runtime/runtime-scopes.cc",
947     "src/runtime/runtime-strings.cc",
948     "src/runtime/runtime-symbol.cc",
949     "src/runtime/runtime-test.cc",
950     "src/runtime/runtime-typedarray.cc",
951     "src/runtime/runtime-uri.cc",
952     "src/runtime/runtime-utils.h",
953     "src/runtime/runtime.cc",
954     "src/runtime/runtime.h",
955     "src/safepoint-table.cc",
956     "src/safepoint-table.h",
957     "src/sampler.cc",
958     "src/sampler.h",
959     "src/scanner-character-streams.cc",
960     "src/scanner-character-streams.h",
961     "src/scanner.cc",
962     "src/scanner.h",
963     "src/scopeinfo.cc",
964     "src/scopeinfo.h",
965     "src/scopes.cc",
966     "src/scopes.h",
967     "src/small-pointer-list.h",
968     "src/smart-pointers.h",
969     "src/snapshot/natives.h",
970     "src/snapshot/serialize.cc",
971     "src/snapshot/serialize.h",
972     "src/snapshot/snapshot-common.cc",
973     "src/snapshot/snapshot-source-sink.cc",
974     "src/snapshot/snapshot-source-sink.h",
975     "src/snapshot/snapshot.h",
976     "src/string-builder.cc",
977     "src/string-builder.h",
978     "src/string-search.cc",
979     "src/string-search.h",
980     "src/string-stream.cc",
981     "src/string-stream.h",
982     "src/strings-storage.cc",
983     "src/strings-storage.h",
984     "src/strtod.cc",
985     "src/strtod.h",
986     "src/token.cc",
987     "src/token.h",
988     "src/transitions-inl.h",
989     "src/transitions.cc",
990     "src/transitions.h",
991     "src/type-feedback-vector-inl.h",
992     "src/type-feedback-vector.cc",
993     "src/type-feedback-vector.h",
994     "src/type-info.cc",
995     "src/type-info.h",
996     "src/types-inl.h",
997     "src/types.cc",
998     "src/types.h",
999     "src/typing.cc",
1000     "src/typing.h",
1001     "src/unbound-queue-inl.h",
1002     "src/unbound-queue.h",
1003     "src/unicode-inl.h",
1004     "src/unicode.cc",
1005     "src/unicode.h",
1006     "src/unicode-decoder.cc",
1007     "src/unicode-decoder.h",
1008     "src/unique.h",
1009     "src/utils-inl.h",
1010     "src/utils.cc",
1011     "src/utils.h",
1012     "src/v8.cc",
1013     "src/v8.h",
1014     "src/v8memory.h",
1015     "src/v8threads.cc",
1016     "src/v8threads.h",
1017     "src/variables.cc",
1018     "src/variables.h",
1019     "src/version.cc",
1020     "src/version.h",
1021     "src/vm-state-inl.h",
1022     "src/vm-state.h",
1023     "src/zone.cc",
1024     "src/zone.h",
1025     "src/third_party/fdlibm/fdlibm.cc",
1026     "src/third_party/fdlibm/fdlibm.h",
1027   ]
1028
1029   if (v8_target_arch == "x86") {
1030     sources += [
1031       "src/ia32/assembler-ia32-inl.h",
1032       "src/ia32/assembler-ia32.cc",
1033       "src/ia32/assembler-ia32.h",
1034       "src/ia32/builtins-ia32.cc",
1035       "src/ia32/code-stubs-ia32.cc",
1036       "src/ia32/code-stubs-ia32.h",
1037       "src/ia32/codegen-ia32.cc",
1038       "src/ia32/codegen-ia32.h",
1039       "src/ia32/cpu-ia32.cc",
1040       "src/ia32/debug-ia32.cc",
1041       "src/ia32/deoptimizer-ia32.cc",
1042       "src/ia32/disasm-ia32.cc",
1043       "src/ia32/frames-ia32.cc",
1044       "src/ia32/frames-ia32.h",
1045       "src/ia32/full-codegen-ia32.cc",
1046       "src/ia32/interface-descriptors-ia32.cc",
1047       "src/ia32/lithium-codegen-ia32.cc",
1048       "src/ia32/lithium-codegen-ia32.h",
1049       "src/ia32/lithium-gap-resolver-ia32.cc",
1050       "src/ia32/lithium-gap-resolver-ia32.h",
1051       "src/ia32/lithium-ia32.cc",
1052       "src/ia32/lithium-ia32.h",
1053       "src/ia32/macro-assembler-ia32.cc",
1054       "src/ia32/macro-assembler-ia32.h",
1055       "src/ia32/regexp-macro-assembler-ia32.cc",
1056       "src/ia32/regexp-macro-assembler-ia32.h",
1057       "src/compiler/ia32/code-generator-ia32.cc",
1058       "src/compiler/ia32/instruction-codes-ia32.h",
1059       "src/compiler/ia32/instruction-selector-ia32.cc",
1060       "src/compiler/ia32/linkage-ia32.cc",
1061       "src/ic/ia32/access-compiler-ia32.cc",
1062       "src/ic/ia32/handler-compiler-ia32.cc",
1063       "src/ic/ia32/ic-ia32.cc",
1064       "src/ic/ia32/ic-compiler-ia32.cc",
1065       "src/ic/ia32/stub-cache-ia32.cc",
1066     ]
1067   } else if (v8_target_arch == "x64") {
1068     sources += [
1069       "src/x64/assembler-x64-inl.h",
1070       "src/x64/assembler-x64.cc",
1071       "src/x64/assembler-x64.h",
1072       "src/x64/builtins-x64.cc",
1073       "src/x64/code-stubs-x64.cc",
1074       "src/x64/code-stubs-x64.h",
1075       "src/x64/codegen-x64.cc",
1076       "src/x64/codegen-x64.h",
1077       "src/x64/cpu-x64.cc",
1078       "src/x64/debug-x64.cc",
1079       "src/x64/deoptimizer-x64.cc",
1080       "src/x64/disasm-x64.cc",
1081       "src/x64/frames-x64.cc",
1082       "src/x64/frames-x64.h",
1083       "src/x64/full-codegen-x64.cc",
1084       "src/x64/interface-descriptors-x64.cc",
1085       "src/x64/lithium-codegen-x64.cc",
1086       "src/x64/lithium-codegen-x64.h",
1087       "src/x64/lithium-gap-resolver-x64.cc",
1088       "src/x64/lithium-gap-resolver-x64.h",
1089       "src/x64/lithium-x64.cc",
1090       "src/x64/lithium-x64.h",
1091       "src/x64/macro-assembler-x64.cc",
1092       "src/x64/macro-assembler-x64.h",
1093       "src/x64/regexp-macro-assembler-x64.cc",
1094       "src/x64/regexp-macro-assembler-x64.h",
1095       "src/compiler/x64/code-generator-x64.cc",
1096       "src/compiler/x64/instruction-codes-x64.h",
1097       "src/compiler/x64/instruction-selector-x64.cc",
1098       "src/compiler/x64/linkage-x64.cc",
1099       "src/ic/x64/access-compiler-x64.cc",
1100       "src/ic/x64/handler-compiler-x64.cc",
1101       "src/ic/x64/ic-x64.cc",
1102       "src/ic/x64/ic-compiler-x64.cc",
1103       "src/ic/x64/stub-cache-x64.cc",
1104     ]
1105   } else if (v8_target_arch == "arm") {
1106     sources += [
1107       "src/arm/assembler-arm-inl.h",
1108       "src/arm/assembler-arm.cc",
1109       "src/arm/assembler-arm.h",
1110       "src/arm/builtins-arm.cc",
1111       "src/arm/code-stubs-arm.cc",
1112       "src/arm/code-stubs-arm.h",
1113       "src/arm/codegen-arm.cc",
1114       "src/arm/codegen-arm.h",
1115       "src/arm/constants-arm.h",
1116       "src/arm/constants-arm.cc",
1117       "src/arm/cpu-arm.cc",
1118       "src/arm/debug-arm.cc",
1119       "src/arm/deoptimizer-arm.cc",
1120       "src/arm/disasm-arm.cc",
1121       "src/arm/frames-arm.cc",
1122       "src/arm/frames-arm.h",
1123       "src/arm/full-codegen-arm.cc",
1124       "src/arm/interface-descriptors-arm.cc",
1125       "src/arm/interface-descriptors-arm.h",
1126       "src/arm/lithium-arm.cc",
1127       "src/arm/lithium-arm.h",
1128       "src/arm/lithium-codegen-arm.cc",
1129       "src/arm/lithium-codegen-arm.h",
1130       "src/arm/lithium-gap-resolver-arm.cc",
1131       "src/arm/lithium-gap-resolver-arm.h",
1132       "src/arm/macro-assembler-arm.cc",
1133       "src/arm/macro-assembler-arm.h",
1134       "src/arm/regexp-macro-assembler-arm.cc",
1135       "src/arm/regexp-macro-assembler-arm.h",
1136       "src/arm/simulator-arm.cc",
1137       "src/compiler/arm/code-generator-arm.cc",
1138       "src/compiler/arm/instruction-codes-arm.h",
1139       "src/compiler/arm/instruction-selector-arm.cc",
1140       "src/compiler/arm/linkage-arm.cc",
1141       "src/ic/arm/access-compiler-arm.cc",
1142       "src/ic/arm/handler-compiler-arm.cc",
1143       "src/ic/arm/ic-arm.cc",
1144       "src/ic/arm/ic-compiler-arm.cc",
1145       "src/ic/arm/stub-cache-arm.cc",
1146     ]
1147   } else if (v8_target_arch == "arm64") {
1148     sources += [
1149       "src/arm64/assembler-arm64.cc",
1150       "src/arm64/assembler-arm64.h",
1151       "src/arm64/assembler-arm64-inl.h",
1152       "src/arm64/builtins-arm64.cc",
1153       "src/arm64/codegen-arm64.cc",
1154       "src/arm64/codegen-arm64.h",
1155       "src/arm64/code-stubs-arm64.cc",
1156       "src/arm64/code-stubs-arm64.h",
1157       "src/arm64/constants-arm64.h",
1158       "src/arm64/cpu-arm64.cc",
1159       "src/arm64/debug-arm64.cc",
1160       "src/arm64/decoder-arm64.cc",
1161       "src/arm64/decoder-arm64.h",
1162       "src/arm64/decoder-arm64-inl.h",
1163       "src/arm64/deoptimizer-arm64.cc",
1164       "src/arm64/disasm-arm64.cc",
1165       "src/arm64/disasm-arm64.h",
1166       "src/arm64/frames-arm64.cc",
1167       "src/arm64/frames-arm64.h",
1168       "src/arm64/full-codegen-arm64.cc",
1169       "src/arm64/instructions-arm64.cc",
1170       "src/arm64/instructions-arm64.h",
1171       "src/arm64/instrument-arm64.cc",
1172       "src/arm64/instrument-arm64.h",
1173       "src/arm64/interface-descriptors-arm64.cc",
1174       "src/arm64/interface-descriptors-arm64.h",
1175       "src/arm64/lithium-arm64.cc",
1176       "src/arm64/lithium-arm64.h",
1177       "src/arm64/lithium-codegen-arm64.cc",
1178       "src/arm64/lithium-codegen-arm64.h",
1179       "src/arm64/lithium-gap-resolver-arm64.cc",
1180       "src/arm64/lithium-gap-resolver-arm64.h",
1181       "src/arm64/macro-assembler-arm64.cc",
1182       "src/arm64/macro-assembler-arm64.h",
1183       "src/arm64/macro-assembler-arm64-inl.h",
1184       "src/arm64/regexp-macro-assembler-arm64.cc",
1185       "src/arm64/regexp-macro-assembler-arm64.h",
1186       "src/arm64/simulator-arm64.cc",
1187       "src/arm64/simulator-arm64.h",
1188       "src/arm64/utils-arm64.cc",
1189       "src/arm64/utils-arm64.h",
1190       "src/compiler/arm64/code-generator-arm64.cc",
1191       "src/compiler/arm64/instruction-codes-arm64.h",
1192       "src/compiler/arm64/instruction-selector-arm64.cc",
1193       "src/compiler/arm64/linkage-arm64.cc",
1194       "src/ic/arm64/access-compiler-arm64.cc",
1195       "src/ic/arm64/handler-compiler-arm64.cc",
1196       "src/ic/arm64/ic-arm64.cc",
1197       "src/ic/arm64/ic-compiler-arm64.cc",
1198       "src/ic/arm64/stub-cache-arm64.cc",
1199     ]
1200   } else if (v8_target_arch == "mipsel") {
1201     sources += [
1202       "src/mips/assembler-mips.cc",
1203       "src/mips/assembler-mips.h",
1204       "src/mips/assembler-mips-inl.h",
1205       "src/mips/builtins-mips.cc",
1206       "src/mips/codegen-mips.cc",
1207       "src/mips/codegen-mips.h",
1208       "src/mips/code-stubs-mips.cc",
1209       "src/mips/code-stubs-mips.h",
1210       "src/mips/constants-mips.cc",
1211       "src/mips/constants-mips.h",
1212       "src/mips/cpu-mips.cc",
1213       "src/mips/debug-mips.cc",
1214       "src/mips/deoptimizer-mips.cc",
1215       "src/mips/disasm-mips.cc",
1216       "src/mips/frames-mips.cc",
1217       "src/mips/frames-mips.h",
1218       "src/mips/full-codegen-mips.cc",
1219       "src/mips/interface-descriptors-mips.cc",
1220       "src/mips/lithium-codegen-mips.cc",
1221       "src/mips/lithium-codegen-mips.h",
1222       "src/mips/lithium-gap-resolver-mips.cc",
1223       "src/mips/lithium-gap-resolver-mips.h",
1224       "src/mips/lithium-mips.cc",
1225       "src/mips/lithium-mips.h",
1226       "src/mips/macro-assembler-mips.cc",
1227       "src/mips/macro-assembler-mips.h",
1228       "src/mips/regexp-macro-assembler-mips.cc",
1229       "src/mips/regexp-macro-assembler-mips.h",
1230       "src/mips/simulator-mips.cc",
1231       "src/compiler/mips/code-generator-mips.cc",
1232       "src/compiler/mips/instruction-codes-mips.h",
1233       "src/compiler/mips/instruction-selector-mips.cc",
1234       "src/compiler/mips/linkage-mips.cc",
1235       "src/ic/mips/access-compiler-mips.cc",
1236       "src/ic/mips/handler-compiler-mips.cc",
1237       "src/ic/mips/ic-mips.cc",
1238       "src/ic/mips/ic-compiler-mips.cc",
1239       "src/ic/mips/stub-cache-mips.cc",
1240     ]
1241   } else if (v8_target_arch == "mips64el") {
1242     sources += [
1243       "src/mips64/assembler-mips64.cc",
1244       "src/mips64/assembler-mips64.h",
1245       "src/mips64/assembler-mips64-inl.h",
1246       "src/mips64/builtins-mips64.cc",
1247       "src/mips64/codegen-mips64.cc",
1248       "src/mips64/codegen-mips64.h",
1249       "src/mips64/code-stubs-mips64.cc",
1250       "src/mips64/code-stubs-mips64.h",
1251       "src/mips64/constants-mips64.cc",
1252       "src/mips64/constants-mips64.h",
1253       "src/mips64/cpu-mips64.cc",
1254       "src/mips64/debug-mips64.cc",
1255       "src/mips64/deoptimizer-mips64.cc",
1256       "src/mips64/disasm-mips64.cc",
1257       "src/mips64/frames-mips64.cc",
1258       "src/mips64/frames-mips64.h",
1259       "src/mips64/full-codegen-mips64.cc",
1260       "src/mips64/interface-descriptors-mips64.cc",
1261       "src/mips64/lithium-codegen-mips64.cc",
1262       "src/mips64/lithium-codegen-mips64.h",
1263       "src/mips64/lithium-gap-resolver-mips64.cc",
1264       "src/mips64/lithium-gap-resolver-mips64.h",
1265       "src/mips64/lithium-mips64.cc",
1266       "src/mips64/lithium-mips64.h",
1267       "src/mips64/macro-assembler-mips64.cc",
1268       "src/mips64/macro-assembler-mips64.h",
1269       "src/mips64/regexp-macro-assembler-mips64.cc",
1270       "src/mips64/regexp-macro-assembler-mips64.h",
1271       "src/mips64/simulator-mips64.cc",
1272       "src/ic/mips64/access-compiler-mips64.cc",
1273       "src/ic/mips64/handler-compiler-mips64.cc",
1274       "src/ic/mips64/ic-mips64.cc",
1275       "src/ic/mips64/ic-compiler-mips64.cc",
1276       "src/ic/mips64/stub-cache-mips64.cc",
1277     ]
1278   }
1279
1280   configs -= [ "//build/config/compiler:chromium_code" ]
1281   configs += [ "//build/config/compiler:no_chromium_code" ]
1282   configs += [
1283     ":internal_config",
1284     ":features",
1285     ":toolchain",
1286   ]
1287
1288   if (!is_debug) {
1289     configs -= [ "//build/config/compiler:optimize" ]
1290     configs += [ "//build/config/compiler:optimize_max" ]
1291   }
1292
1293   defines = []
1294   deps = [
1295     ":v8_libbase",
1296   ]
1297
1298   if (is_win) {
1299     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1300     cflags = [ "/wd4267" ]
1301   }
1302
1303   if (v8_enable_i18n_support) {
1304     deps += [ "//third_party/icu" ]
1305     if (is_win) {
1306       deps += [ "//third_party/icu:icudata" ]
1307     }
1308
1309     # TODO(jochen): Add support for icu_use_data_file_flag
1310     defines += [ "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE" ]
1311   } else {
1312     sources -= [
1313       "src/i18n.cc",
1314       "src/i18n.h",
1315     ]
1316   }
1317
1318   if (v8_postmortem_support) {
1319     sources += [ "$target_gen_dir/debug-support.cc" ]
1320     deps += [ ":postmortem-metadata" ]
1321   }
1322 }
1323
1324 source_set("v8_libbase") {
1325   visibility = [ ":*" ]  # Only targets in this file can depend on this.
1326
1327   sources = [
1328     "src/base/atomicops.h",
1329     "src/base/atomicops_internals_arm64_gcc.h",
1330     "src/base/atomicops_internals_arm_gcc.h",
1331     "src/base/atomicops_internals_atomicword_compat.h",
1332     "src/base/atomicops_internals_mac.h",
1333     "src/base/atomicops_internals_mips_gcc.h",
1334     "src/base/atomicops_internals_tsan.h",
1335     "src/base/atomicops_internals_x86_gcc.cc",
1336     "src/base/atomicops_internals_x86_gcc.h",
1337     "src/base/atomicops_internals_x86_msvc.h",
1338     "src/base/bits.cc",
1339     "src/base/bits.h",
1340     "src/base/build_config.h",
1341     "src/base/cpu.cc",
1342     "src/base/cpu.h",
1343     "src/base/division-by-constant.cc",
1344     "src/base/division-by-constant.h",
1345     "src/base/flags.h",
1346     "src/base/functional.cc",
1347     "src/base/functional.h",
1348     "src/base/iterator.h",
1349     "src/base/lazy-instance.h",
1350     "src/base/logging.cc",
1351     "src/base/logging.h",
1352     "src/base/macros.h",
1353     "src/base/once.cc",
1354     "src/base/once.h",
1355     "src/base/platform/elapsed-timer.h",
1356     "src/base/platform/time.cc",
1357     "src/base/platform/time.h",
1358     "src/base/platform/condition-variable.cc",
1359     "src/base/platform/condition-variable.h",
1360     "src/base/platform/mutex.cc",
1361     "src/base/platform/mutex.h",
1362     "src/base/platform/platform.h",
1363     "src/base/platform/semaphore.cc",
1364     "src/base/platform/semaphore.h",
1365     "src/base/safe_conversions.h",
1366     "src/base/safe_conversions_impl.h",
1367     "src/base/safe_math.h",
1368     "src/base/safe_math_impl.h",
1369     "src/base/sys-info.cc",
1370     "src/base/sys-info.h",
1371     "src/base/utils/random-number-generator.cc",
1372     "src/base/utils/random-number-generator.h",
1373   ]
1374
1375   configs -= [ "//build/config/compiler:chromium_code" ]
1376   configs += [ "//build/config/compiler:no_chromium_code" ]
1377   configs += [
1378     ":internal_config_base",
1379     ":features",
1380     ":toolchain",
1381   ]
1382
1383   if (!is_debug) {
1384     configs -= [ "//build/config/compiler:optimize" ]
1385     configs += [ "//build/config/compiler:optimize_max" ]
1386   }
1387
1388   defines = []
1389
1390   if (is_posix) {
1391     sources += [ "src/base/platform/platform-posix.cc" ]
1392   }
1393
1394   if (is_linux) {
1395     sources += [ "src/base/platform/platform-linux.cc" ]
1396
1397     libs = [ "dl", "rt" ]
1398   } else if (is_android) {
1399     defines += [ "CAN_USE_VFP_INSTRUCTIONS" ]
1400
1401     if (host_os == "mac") {
1402       if (current_toolchain == host_toolchain) {
1403         sources += [ "src/base/platform/platform-macos.cc" ]
1404       } else {
1405         sources += [ "src/base/platform/platform-linux.cc" ]
1406       }
1407     } else {
1408       sources += [ "src/base/platform/platform-linux.cc" ]
1409       if (current_toolchain == host_toolchain) {
1410         defines += [ "V8_LIBRT_NOT_AVAILABLE" ]
1411       }
1412     }
1413   } else if (is_mac) {
1414     sources += [ "src/base/platform/platform-macos.cc" ]
1415   } else if (is_win) {
1416     # TODO(jochen): Add support for cygwin.
1417     sources += [
1418       "src/base/platform/platform-win32.cc",
1419       "src/base/win32-headers.h",
1420     ]
1421
1422     defines += [ "_CRT_RAND_S" ]  # for rand_s()
1423
1424     libs = [
1425       "winmm.lib",
1426       "ws2_32.lib",
1427     ]
1428   }
1429
1430   # TODO(jochen): Add support for qnx, freebsd, openbsd, netbsd, and solaris.
1431 }
1432
1433 source_set("v8_libplatform") {
1434   sources = [
1435     "include/libplatform/libplatform.h",
1436     "src/libplatform/default-platform.cc",
1437     "src/libplatform/default-platform.h",
1438     "src/libplatform/task-queue.cc",
1439     "src/libplatform/task-queue.h",
1440     "src/libplatform/worker-thread.cc",
1441     "src/libplatform/worker-thread.h",
1442   ]
1443
1444   configs -= [ "//build/config/compiler:chromium_code" ]
1445   configs += [ "//build/config/compiler:no_chromium_code" ]
1446   configs += [
1447     ":internal_config_base",
1448     ":features",
1449     ":toolchain",
1450   ]
1451
1452   if (!is_debug) {
1453     configs -= [ "//build/config/compiler:optimize" ]
1454     configs += [ "//build/config/compiler:optimize_max" ]
1455   }
1456
1457   deps = [
1458     ":v8_libbase",
1459   ]
1460 }
1461
1462 ###############################################################################
1463 # Executables
1464 #
1465
1466 if (current_toolchain == snapshot_toolchain) {
1467   executable("mksnapshot") {
1468     visibility = [ ":*" ]  # Only targets in this file can depend on this.
1469
1470     sources = [
1471       "src/snapshot/mksnapshot.cc",
1472     ]
1473
1474     configs -= [ "//build/config/compiler:chromium_code" ]
1475     configs += [ "//build/config/compiler:no_chromium_code" ]
1476     configs += [
1477       ":internal_config",
1478       ":features",
1479       ":toolchain",
1480     ]
1481
1482     deps = [
1483       ":v8_base",
1484       ":v8_libplatform",
1485       ":v8_nosnapshot",
1486       "//build/config/sanitizers:deps",
1487     ]
1488   }
1489 }
1490
1491 ###############################################################################
1492 # Public targets
1493 #
1494
1495 if (component_mode == "shared_library") {
1496   component("v8") {
1497     sources = [
1498       "src/v8dll-main.cc",
1499     ]
1500
1501     if (v8_use_snapshot && v8_use_external_startup_data) {
1502       deps = [
1503         ":v8_base",
1504         ":v8_external_snapshot",
1505       ]
1506     } else if (v8_use_snapshot) {
1507       deps = [
1508         ":v8_base",
1509         ":v8_snapshot",
1510       ]
1511     } else {
1512       assert(!v8_use_external_startup_data)
1513       deps = [
1514         ":v8_base",
1515         ":v8_nosnapshot",
1516       ]
1517     }
1518
1519     configs -= [ "//build/config/compiler:chromium_code" ]
1520     configs += [ "//build/config/compiler:no_chromium_code" ]
1521     configs += [
1522       ":internal_config",
1523       ":features",
1524       ":toolchain",
1525     ]
1526
1527     direct_dependent_configs = [ ":external_config" ]
1528
1529     libs = []
1530     if (is_android && current_toolchain != host_toolchain) {
1531       libs += [ "log" ]
1532     }
1533   }
1534 } else {
1535   group("v8") {
1536     if (v8_use_snapshot && v8_use_external_startup_data) {
1537       deps = [
1538         ":v8_base",
1539         ":v8_external_snapshot",
1540       ]
1541     } else if (v8_use_snapshot) {
1542       deps = [
1543         ":v8_base",
1544         ":v8_snapshot",
1545       ]
1546     } else {
1547       assert(!v8_use_external_startup_data)
1548       deps = [
1549         ":v8_base",
1550         ":v8_nosnapshot",
1551       ]
1552     }
1553
1554     direct_dependent_configs = [ ":external_config" ]
1555   }
1556 }
1557
1558 if ((current_toolchain == host_toolchain && v8_toolset_for_d8 == "host") ||
1559     (current_toolchain != host_toolchain && v8_toolset_for_d8 == "target")) {
1560   executable("d8") {
1561     sources = [
1562       "src/d8.cc",
1563       "src/d8.h",
1564       "src/startup-data-util.h",
1565       "src/startup-data-util.cc",
1566     ]
1567
1568     configs -= [ "//build/config/compiler:chromium_code" ]
1569     configs += [ "//build/config/compiler:no_chromium_code" ]
1570     configs += [
1571       ":internal_config",
1572       ":features",
1573       ":toolchain",
1574     ]
1575
1576     deps = [
1577       ":d8_js2c",
1578       ":v8",
1579       ":v8_libplatform",
1580       "//build/config/sanitizers:deps",
1581     ]
1582
1583     # TODO(jochen): Add support for readline and vtunejit.
1584
1585     if (is_posix) {
1586       sources += [ "src/d8-posix.cc" ]
1587     } else if (is_win) {
1588       sources += [ "src/d8-windows.cc" ]
1589     }
1590
1591     if (component_mode != "shared_library") {
1592       sources += [
1593         "src/d8-debug.cc",
1594         "$target_gen_dir/d8-js.cc",
1595       ]
1596     }
1597     if (v8_enable_i18n_support) {
1598       deps += [ "//third_party/icu" ]
1599     }
1600   }
1601 }