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