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