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.
5 # Because standalone V8 builds are not supported, assume this is part of a
7 import("//build/module_args/v8.gni")
9 # TODO(jochen): These will need to be user-settable to support standalone V8
11 v8_deprecation_warnings = false
12 v8_enable_disassembler = false
13 v8_enable_gdbjit = false
14 v8_enable_handle_zapping = true
15 v8_enable_i18n_support = true
16 v8_enable_verify_heap = false
17 v8_interpreted_regexp = false
18 v8_object_print = false
19 v8_postmortem_support = false
20 v8_use_snapshot = true
21 v8_target_arch = cpu_arch
22 v8_random_seed = "314159265"
23 v8_toolset_for_d8 = "host"
25 ###############################################################################
28 config("internal_config") {
29 visibility = [ ":*" ] # Only targets in this file can depend on this.
31 include_dirs = [ "." ]
33 if (component_mode == "shared_library") {
41 config("internal_config_base") {
42 visibility = [ ":*" ] # Only targets in this file can depend on this.
44 include_dirs = [ "." ]
47 # This config should only be applied to code using V8 and not any V8 code
49 config("external_config") {
50 if (is_component_build) {
56 include_dirs = [ "include" ]
60 visibility = [ ":*" ] # Only targets in this file can depend on this.
64 if (v8_enable_disassembler == true) {
65 defines += [ "ENABLE_DISASSEMBLER" ]
67 if (v8_enable_gdbjit == true) {
68 defines += [ "ENABLE_GDB_JIT_INTERFACE" ]
70 if (v8_object_print == true) {
71 defines += [ "OBJECT_PRINT" ]
73 if (v8_enable_verify_heap == true) {
74 defines += [ "VERIFY_HEAP" ]
76 if (v8_interpreted_regexp == true) {
77 defines += [ "V8_INTERPRETED_REGEXP" ]
79 if (v8_deprecation_warnings == true) {
80 defines += [ "V8_DEPRECATION_WARNINGS" ]
82 if (v8_enable_i18n_support == true) {
83 defines += [ "V8_I18N_SUPPORT" ]
85 if (v8_enable_handle_zapping == true) {
86 defines += [ "ENABLE_HANDLE_ZAPPING" ]
88 if (v8_use_external_startup_data == true) {
89 defines += [ "V8_USE_EXTERNAL_STARTUP_DATA" ]
94 visibility = [ ":*" ] # Only targets in this file can depend on this.
99 # TODO(jochen): Add support for arm subarchs, mips, mipsel.
101 if (v8_target_arch == "arm") {
102 defines += [ "V8_TARGET_ARCH_ARM" ]
103 if (arm_version == 7) {
104 defines += [ "CAN_USE_ARMV7_INSTRUCTIONS" ]
106 if (arm_fpu == "vfpv3-d16") {
107 defines += [ "CAN_USE_VFP3_INSTRUCTIONS" ]
109 if (arm_fpu == "vfpv3") {
111 "CAN_USE_VFP3_INSTRUCTIONS",
112 "CAN_USE_VFP32DREGS",
115 if (arm_fpu == "neon") {
117 "CAN_USE_VFP3_INSTRUCTIONS",
118 "CAN_USE_VFP32DREGS",
123 # TODO(jochen): Add support for arm_test_noprobe.
125 # TODO(jochen): Add support for cpu_arch != v8_target_arch/
127 if (v8_target_arch == "arm64") {
128 defines += [ "V8_TARGET_ARCH_ARM64" ]
130 if (v8_target_arch == "x86") {
131 defines += [ "V8_TARGET_ARCH_IA32" ]
133 if (v8_target_arch == "x64") {
134 defines += [ "V8_TARGET_ARCH_X64" ]
137 defines += [ "WIN32" ]
138 # TODO(jochen): Support v8_enable_prof.
141 # TODO(jochen): Add support for compiling with simulators.
144 # TODO(jochen): Add support for different debug optimization levels.
146 "ENABLE_DISASSEMBLER",
156 ###############################################################################
161 visibility = [ ":*" ] # Only targets in this file can depend on this.
163 script = "tools/js2c.py"
165 # The script depends on this other script, this rule causes a rebuild if it
167 inputs = [ "tools/jsmin.py" ]
176 "src/third_party/fdlibm/fdlibm.js",
180 "src/arraybuffer.js",
183 "src/object-observe.js",
185 "src/weak-collection.js",
186 "src/collection-iterator.js",
190 "src/array-iterator.js",
191 "src/string-iterator.js",
192 "src/debug-debugger.js",
193 "src/mirror-debugger.js",
194 "src/liveedit-debugger.js",
199 "$target_gen_dir/libraries.cc",
202 if (v8_enable_i18n_support) {
203 sources += [ "src/i18n.js" ]
207 rebase_path("$target_gen_dir/libraries.cc", root_build_dir),
209 ] + rebase_path(sources, root_build_dir)
211 if (v8_use_external_startup_data) {
212 outputs += [ "$target_gen_dir/libraries.bin" ]
215 rebase_path("$target_gen_dir/libraries.bin", root_build_dir),
220 action("js2c_experimental") {
221 visibility = [ ":*" ] # Only targets in this file can depend on this.
223 script = "tools/js2c.py"
225 # The script depends on this other script, this rule causes a rebuild if it
227 inputs = [ "tools/jsmin.py" ]
233 "src/harmony-string.js",
234 "src/harmony-array.js",
235 "src/harmony-array-includes.js",
236 "src/harmony-typedarray.js",
237 "src/harmony-tostring.js",
238 "src/harmony-templates.js",
239 "src/harmony-regexp.js",
243 "$target_gen_dir/experimental-libraries.cc",
247 rebase_path("$target_gen_dir/experimental-libraries.cc",
250 ] + rebase_path(sources, root_build_dir)
252 if (v8_use_external_startup_data) {
253 outputs += [ "$target_gen_dir/libraries_experimental.bin" ]
256 rebase_path("$target_gen_dir/libraries_experimental.bin", root_build_dir),
262 visibility = [ ":*" ] # Only targets in this file can depend on this.
264 script = "tools/js2c.py"
272 "$target_gen_dir/d8-js.cc",
275 args = rebase_path(outputs, root_build_dir) + [ "D8" ] +
276 rebase_path(inputs, root_build_dir)
279 if (v8_use_external_startup_data) {
280 action("natives_blob") {
281 visibility = [ ":*" ] # Only targets in this file can depend on this.
285 ":js2c_experimental",
289 "$target_gen_dir/libraries.bin",
290 "$target_gen_dir/libraries_experimental.bin",
294 "$root_out_dir/natives_blob.bin",
297 script = "tools/concatenate-files.py"
299 args = rebase_path(sources + outputs, root_build_dir)
303 action("postmortem-metadata") {
304 visibility = [ ":*" ] # Only targets in this file can depend on this.
306 script = "tools/gen-postmortem-metadata.py"
314 "$target_gen_dir/debug-support.cc",
317 args = rebase_path(outputs, root_build_dir) +
318 rebase_path(sources, root_build_dir)
321 action("run_mksnapshot") {
322 visibility = [ ":*" ] # Only targets in this file can depend on this.
325 ":mksnapshot($host_toolchain)",
328 script = "tools/run.py"
331 "$target_gen_dir/snapshot.cc",
335 "./" + rebase_path(get_label_info(":mksnapshot($host_toolchain)",
336 "root_out_dir") + "/mksnapshot",
338 "--log-snapshot-positions",
340 rebase_path("$target_gen_dir/snapshot.log", root_build_dir),
341 rebase_path("$target_gen_dir/snapshot.cc", root_build_dir),
344 if (v8_random_seed != "0") {
351 if (v8_use_external_startup_data) {
352 outputs += [ "$root_out_dir/snapshot_blob.bin" ]
355 rebase_path("$root_out_dir/snapshot_blob.bin", root_build_dir),
360 ###############################################################################
361 # Source Sets (aka static libraries)
364 source_set("v8_nosnapshot") {
365 visibility = [ ":*" ] # Only targets in this file can depend on this.
369 ":js2c_experimental",
374 "$target_gen_dir/libraries.cc",
375 "$target_gen_dir/experimental-libraries.cc",
376 "src/snapshot-empty.cc",
379 configs -= [ "//build/config/compiler:chromium_code" ]
380 configs += [ "//build/config/compiler:no_chromium_code" ]
388 source_set("v8_snapshot") {
389 visibility = [ ":*" ] # Only targets in this file can depend on this.
393 ":js2c_experimental",
399 "$target_gen_dir/libraries.cc",
400 "$target_gen_dir/experimental-libraries.cc",
401 "$target_gen_dir/snapshot.cc",
404 configs -= [ "//build/config/compiler:chromium_code" ]
405 configs += [ "//build/config/compiler:no_chromium_code" ]
413 if (v8_use_external_startup_data) {
414 source_set("v8_external_snapshot") {
415 visibility = [ ":*" ] # Only targets in this file can depend on this.
419 ":js2c_experimental",
426 "src/natives-external.cc",
427 "src/snapshot-external.cc",
430 configs -= [ "//build/config/compiler:chromium_code" ]
431 configs += [ "//build/config/compiler:no_chromium_code" ]
440 source_set("v8_base") {
441 visibility = [ ":*" ] # Only targets in this file can depend on this.
448 "src/allocation-site-scopes.cc",
449 "src/allocation-site-scopes.h",
450 "src/allocation-tracker.cc",
451 "src/allocation-tracker.h",
454 "src/api-natives.cc",
460 "src/assert-scope.h",
461 "src/assert-scope.cc",
462 "src/ast-numbering.cc",
463 "src/ast-numbering.h",
464 "src/ast-value-factory.cc",
465 "src/ast-value-factory.h",
468 "src/background-parsing-task.cc",
469 "src/background-parsing-task.h",
470 "src/bailout-reason.cc",
471 "src/bailout-reason.h",
472 "src/basic-block-profiler.cc",
473 "src/basic-block-profiler.h",
474 "src/bignum-dtoa.cc",
480 "src/bootstrapper.cc",
481 "src/bootstrapper.h",
484 "src/bytecodes-irregexp.h",
485 "src/cached-powers.cc",
486 "src/cached-powers.h",
487 "src/char-predicates.cc",
488 "src/char-predicates-inl.h",
489 "src/char-predicates.h",
492 "src/circular-queue-inl.h",
493 "src/circular-queue.h",
494 "src/code-factory.cc",
495 "src/code-factory.h",
498 "src/code-stubs-hydrogen.cc",
502 "src/compilation-cache.cc",
503 "src/compilation-cache.h",
504 "src/compilation-statistics.cc",
505 "src/compilation-statistics.h",
506 "src/compiler/access-builder.cc",
507 "src/compiler/access-builder.h",
508 "src/compiler/all-nodes.cc",
509 "src/compiler/all-nodes.h",
510 "src/compiler/ast-graph-builder.cc",
511 "src/compiler/ast-graph-builder.h",
512 "src/compiler/ast-loop-assignment-analyzer.cc",
513 "src/compiler/ast-loop-assignment-analyzer.h",
514 "src/compiler/basic-block-instrumentor.cc",
515 "src/compiler/basic-block-instrumentor.h",
516 "src/compiler/change-lowering.cc",
517 "src/compiler/change-lowering.h",
518 "src/compiler/code-generator-impl.h",
519 "src/compiler/code-generator.cc",
520 "src/compiler/code-generator.h",
521 "src/compiler/common-node-cache.cc",
522 "src/compiler/common-node-cache.h",
523 "src/compiler/common-operator-reducer.cc",
524 "src/compiler/common-operator-reducer.h",
525 "src/compiler/common-operator.cc",
526 "src/compiler/common-operator.h",
527 "src/compiler/control-builders.cc",
528 "src/compiler/control-builders.h",
529 "src/compiler/control-equivalence.h",
530 "src/compiler/control-flow-optimizer.cc",
531 "src/compiler/control-flow-optimizer.h",
532 "src/compiler/control-reducer.cc",
533 "src/compiler/control-reducer.h",
534 "src/compiler/diamond.h",
535 "src/compiler/frame.h",
536 "src/compiler/gap-resolver.cc",
537 "src/compiler/gap-resolver.h",
538 "src/compiler/generic-algorithm.h",
539 "src/compiler/graph-builder.h",
540 "src/compiler/graph-inl.h",
541 "src/compiler/graph-reducer.cc",
542 "src/compiler/graph-reducer.h",
543 "src/compiler/graph-replay.cc",
544 "src/compiler/graph-replay.h",
545 "src/compiler/graph-visualizer.cc",
546 "src/compiler/graph-visualizer.h",
547 "src/compiler/graph.cc",
548 "src/compiler/graph.h",
549 "src/compiler/instruction-codes.h",
550 "src/compiler/instruction-selector-impl.h",
551 "src/compiler/instruction-selector.cc",
552 "src/compiler/instruction-selector.h",
553 "src/compiler/instruction.cc",
554 "src/compiler/instruction.h",
555 "src/compiler/js-builtin-reducer.cc",
556 "src/compiler/js-builtin-reducer.h",
557 "src/compiler/js-context-specialization.cc",
558 "src/compiler/js-context-specialization.h",
559 "src/compiler/js-generic-lowering.cc",
560 "src/compiler/js-generic-lowering.h",
561 "src/compiler/js-graph.cc",
562 "src/compiler/js-graph.h",
563 "src/compiler/js-inlining.cc",
564 "src/compiler/js-inlining.h",
565 "src/compiler/js-intrinsic-lowering.cc",
566 "src/compiler/js-intrinsic-lowering.h",
567 "src/compiler/js-operator.cc",
568 "src/compiler/js-operator.h",
569 "src/compiler/js-typed-lowering.cc",
570 "src/compiler/js-typed-lowering.h",
571 "src/compiler/jump-threading.cc",
572 "src/compiler/jump-threading.h",
573 "src/compiler/linkage-impl.h",
574 "src/compiler/linkage.cc",
575 "src/compiler/linkage.h",
576 "src/compiler/load-elimination.cc",
577 "src/compiler/load-elimination.h",
578 "src/compiler/loop-peeling.cc",
579 "src/compiler/loop-analysis.cc",
580 "src/compiler/loop-analysis.h",
581 "src/compiler/machine-operator-reducer.cc",
582 "src/compiler/machine-operator-reducer.h",
583 "src/compiler/machine-operator.cc",
584 "src/compiler/machine-operator.h",
585 "src/compiler/machine-type.cc",
586 "src/compiler/machine-type.h",
587 "src/compiler/move-optimizer.cc",
588 "src/compiler/move-optimizer.h",
589 "src/compiler/node-aux-data.h",
590 "src/compiler/node-cache.cc",
591 "src/compiler/node-cache.h",
592 "src/compiler/node-marker.cc",
593 "src/compiler/node-marker.h",
594 "src/compiler/node-matchers.h",
595 "src/compiler/node-properties.cc",
596 "src/compiler/node-properties.h",
597 "src/compiler/node.cc",
598 "src/compiler/node.h",
599 "src/compiler/opcodes.cc",
600 "src/compiler/opcodes.h",
601 "src/compiler/operator-properties.cc",
602 "src/compiler/operator-properties.h",
603 "src/compiler/operator.cc",
604 "src/compiler/operator.h",
605 "src/compiler/osr.cc",
606 "src/compiler/osr.h",
607 "src/compiler/pipeline.cc",
608 "src/compiler/pipeline.h",
609 "src/compiler/pipeline-statistics.cc",
610 "src/compiler/pipeline-statistics.h",
611 "src/compiler/raw-machine-assembler.cc",
612 "src/compiler/raw-machine-assembler.h",
613 "src/compiler/register-allocator.cc",
614 "src/compiler/register-allocator.h",
615 "src/compiler/register-allocator-verifier.cc",
616 "src/compiler/register-allocator-verifier.h",
617 "src/compiler/register-configuration.cc",
618 "src/compiler/register-configuration.h",
619 "src/compiler/representation-change.h",
620 "src/compiler/schedule.cc",
621 "src/compiler/schedule.h",
622 "src/compiler/scheduler.cc",
623 "src/compiler/scheduler.h",
624 "src/compiler/select-lowering.cc",
625 "src/compiler/select-lowering.h",
626 "src/compiler/simplified-lowering.cc",
627 "src/compiler/simplified-lowering.h",
628 "src/compiler/simplified-operator-reducer.cc",
629 "src/compiler/simplified-operator-reducer.h",
630 "src/compiler/simplified-operator.cc",
631 "src/compiler/simplified-operator.h",
632 "src/compiler/source-position.cc",
633 "src/compiler/source-position.h",
634 "src/compiler/typer.cc",
635 "src/compiler/typer.h",
636 "src/compiler/value-numbering-reducer.cc",
637 "src/compiler/value-numbering-reducer.h",
638 "src/compiler/verifier.cc",
639 "src/compiler/verifier.h",
640 "src/compiler/zone-pool.cc",
641 "src/compiler/zone-pool.h",
646 "src/conversions-inl.h",
647 "src/conversions.cc",
651 "src/cpu-profiler-inl.h",
652 "src/cpu-profiler.cc",
653 "src/cpu-profiler.h",
656 "src/dateparser-inl.h",
661 "src/deoptimizer.cc",
664 "src/disassembler.cc",
665 "src/disassembler.h",
672 "src/elements-kind.cc",
673 "src/elements-kind.h",
678 "src/extensions/externalize-string-extension.cc",
679 "src/extensions/externalize-string-extension.h",
680 "src/extensions/free-buffer-extension.cc",
681 "src/extensions/free-buffer-extension.h",
682 "src/extensions/gc-extension.cc",
683 "src/extensions/gc-extension.h",
684 "src/extensions/statistics-extension.cc",
685 "src/extensions/statistics-extension.h",
686 "src/extensions/trigger-failure-extension.cc",
687 "src/extensions/trigger-failure-extension.h",
693 "src/field-index-inl.h",
696 "src/flag-definitions.h",
702 "src/full-codegen.cc",
703 "src/full-codegen.h",
704 "src/func-name-inferrer.cc",
705 "src/func-name-inferrer.h",
708 "src/global-handles.cc",
709 "src/global-handles.h",
715 "src/heap-profiler.cc",
716 "src/heap-profiler.h",
717 "src/heap-snapshot-generator-inl.h",
718 "src/heap-snapshot-generator.cc",
719 "src/heap-snapshot-generator.h",
720 "src/heap/gc-idle-time-handler.cc",
721 "src/heap/gc-idle-time-handler.h",
722 "src/heap/gc-tracer.cc",
723 "src/heap/gc-tracer.h",
724 "src/heap/heap-inl.h",
727 "src/heap/incremental-marking.cc",
728 "src/heap/incremental-marking.h",
729 "src/heap/mark-compact-inl.h",
730 "src/heap/mark-compact.cc",
731 "src/heap/mark-compact.h",
732 "src/heap/objects-visiting-inl.h",
733 "src/heap/objects-visiting.cc",
734 "src/heap/objects-visiting.h",
735 "src/heap/spaces-inl.h",
736 "src/heap/spaces.cc",
738 "src/heap/store-buffer-inl.h",
739 "src/heap/store-buffer.cc",
740 "src/heap/store-buffer.h",
741 "src/hydrogen-alias-analysis.h",
742 "src/hydrogen-bce.cc",
743 "src/hydrogen-bce.h",
744 "src/hydrogen-bch.cc",
745 "src/hydrogen-bch.h",
746 "src/hydrogen-canonicalize.cc",
747 "src/hydrogen-canonicalize.h",
748 "src/hydrogen-check-elimination.cc",
749 "src/hydrogen-check-elimination.h",
750 "src/hydrogen-dce.cc",
751 "src/hydrogen-dce.h",
752 "src/hydrogen-dehoist.cc",
753 "src/hydrogen-dehoist.h",
754 "src/hydrogen-environment-liveness.cc",
755 "src/hydrogen-environment-liveness.h",
756 "src/hydrogen-escape-analysis.cc",
757 "src/hydrogen-escape-analysis.h",
758 "src/hydrogen-flow-engine.h",
759 "src/hydrogen-instructions.cc",
760 "src/hydrogen-instructions.h",
763 "src/hydrogen-gvn.cc",
764 "src/hydrogen-gvn.h",
765 "src/hydrogen-infer-representation.cc",
766 "src/hydrogen-infer-representation.h",
767 "src/hydrogen-infer-types.cc",
768 "src/hydrogen-infer-types.h",
769 "src/hydrogen-load-elimination.cc",
770 "src/hydrogen-load-elimination.h",
771 "src/hydrogen-mark-deoptimize.cc",
772 "src/hydrogen-mark-deoptimize.h",
773 "src/hydrogen-mark-unreachable.cc",
774 "src/hydrogen-mark-unreachable.h",
775 "src/hydrogen-osr.cc",
776 "src/hydrogen-osr.h",
777 "src/hydrogen-range-analysis.cc",
778 "src/hydrogen-range-analysis.h",
779 "src/hydrogen-redundant-phi.cc",
780 "src/hydrogen-redundant-phi.h",
781 "src/hydrogen-removable-simulates.cc",
782 "src/hydrogen-removable-simulates.h",
783 "src/hydrogen-representation-changes.cc",
784 "src/hydrogen-representation-changes.h",
785 "src/hydrogen-sce.cc",
786 "src/hydrogen-sce.h",
787 "src/hydrogen-store-elimination.cc",
788 "src/hydrogen-store-elimination.h",
789 "src/hydrogen-types.cc",
790 "src/hydrogen-types.h",
791 "src/hydrogen-uint32-analysis.cc",
792 "src/hydrogen-uint32-analysis.h",
797 "src/ic/access-compiler.cc",
798 "src/ic/access-compiler.h",
799 "src/ic/call-optimization.cc",
800 "src/ic/call-optimization.h",
801 "src/ic/handler-compiler.cc",
802 "src/ic/handler-compiler.h",
804 "src/ic/ic-state.cc",
808 "src/ic/ic-compiler.cc",
809 "src/ic/ic-compiler.h",
810 "src/ic/stub-cache.cc",
811 "src/ic/stub-cache.h",
812 "src/interface-descriptors.cc",
813 "src/interface-descriptors.h",
814 "src/interpreter-irregexp.cc",
815 "src/interpreter-irregexp.h",
819 "src/json-stringifier.h",
820 "src/jsregexp-inl.h",
823 "src/layout-descriptor-inl.h",
824 "src/layout-descriptor.cc",
825 "src/layout-descriptor.h",
828 "src/lithium-allocator-inl.h",
829 "src/lithium-allocator.cc",
830 "src/lithium-allocator.h",
831 "src/lithium-codegen.cc",
832 "src/lithium-codegen.h",
845 "src/macro-assembler.h",
852 "src/objects-debug.cc",
854 "src/objects-printer.cc",
857 "src/optimizing-compiler-thread.cc",
858 "src/optimizing-compiler-thread.h",
865 "src/preparse-data-format.h",
866 "src/preparse-data.cc",
867 "src/preparse-data.h",
870 "src/prettyprinter.cc",
871 "src/prettyprinter.h",
872 "src/profile-generator-inl.h",
873 "src/profile-generator.cc",
874 "src/profile-generator.h",
875 "src/property-details.h",
879 "src/regexp-macro-assembler-irregexp-inl.h",
880 "src/regexp-macro-assembler-irregexp.cc",
881 "src/regexp-macro-assembler-irregexp.h",
882 "src/regexp-macro-assembler-tracer.cc",
883 "src/regexp-macro-assembler-tracer.h",
884 "src/regexp-macro-assembler.cc",
885 "src/regexp-macro-assembler.h",
886 "src/regexp-stack.cc",
887 "src/regexp-stack.h",
890 "src/runtime-profiler.cc",
891 "src/runtime-profiler.h",
892 "src/runtime/runtime-array.cc",
893 "src/runtime/runtime-classes.cc",
894 "src/runtime/runtime-collections.cc",
895 "src/runtime/runtime-compiler.cc",
896 "src/runtime/runtime-date.cc",
897 "src/runtime/runtime-debug.cc",
898 "src/runtime/runtime-function.cc",
899 "src/runtime/runtime-generator.cc",
900 "src/runtime/runtime-i18n.cc",
901 "src/runtime/runtime-internal.cc",
902 "src/runtime/runtime-json.cc",
903 "src/runtime/runtime-literals.cc",
904 "src/runtime/runtime-liveedit.cc",
905 "src/runtime/runtime-maths.cc",
906 "src/runtime/runtime-numbers.cc",
907 "src/runtime/runtime-object.cc",
908 "src/runtime/runtime-observe.cc",
909 "src/runtime/runtime-proxy.cc",
910 "src/runtime/runtime-regexp.cc",
911 "src/runtime/runtime-scopes.cc",
912 "src/runtime/runtime-strings.cc",
913 "src/runtime/runtime-symbol.cc",
914 "src/runtime/runtime-test.cc",
915 "src/runtime/runtime-typedarray.cc",
916 "src/runtime/runtime-uri.cc",
917 "src/runtime/runtime-utils.h",
918 "src/runtime/runtime.cc",
919 "src/runtime/runtime.h",
920 "src/safepoint-table.cc",
921 "src/safepoint-table.h",
924 "src/scanner-character-streams.cc",
925 "src/scanner-character-streams.h",
934 "src/small-pointer-list.h",
935 "src/smart-pointers.h",
936 "src/snapshot-common.cc",
937 "src/snapshot-source-sink.cc",
938 "src/snapshot-source-sink.h",
940 "src/string-builder.cc",
941 "src/string-builder.h",
942 "src/string-search.cc",
943 "src/string-search.h",
944 "src/string-stream.cc",
945 "src/string-stream.h",
950 "src/transitions-inl.h",
951 "src/transitions.cc",
953 "src/type-feedback-vector-inl.h",
954 "src/type-feedback-vector.cc",
955 "src/type-feedback-vector.h",
963 "src/unbound-queue-inl.h",
964 "src/unbound-queue.h",
968 "src/unicode-decoder.cc",
969 "src/unicode-decoder.h",
983 "src/vm-state-inl.h",
987 "src/third_party/fdlibm/fdlibm.cc",
988 "src/third_party/fdlibm/fdlibm.h",
991 if (v8_target_arch == "x86") {
993 "src/ia32/assembler-ia32-inl.h",
994 "src/ia32/assembler-ia32.cc",
995 "src/ia32/assembler-ia32.h",
996 "src/ia32/builtins-ia32.cc",
997 "src/ia32/code-stubs-ia32.cc",
998 "src/ia32/code-stubs-ia32.h",
999 "src/ia32/codegen-ia32.cc",
1000 "src/ia32/codegen-ia32.h",
1001 "src/ia32/cpu-ia32.cc",
1002 "src/ia32/debug-ia32.cc",
1003 "src/ia32/deoptimizer-ia32.cc",
1004 "src/ia32/disasm-ia32.cc",
1005 "src/ia32/frames-ia32.cc",
1006 "src/ia32/frames-ia32.h",
1007 "src/ia32/full-codegen-ia32.cc",
1008 "src/ia32/interface-descriptors-ia32.cc",
1009 "src/ia32/lithium-codegen-ia32.cc",
1010 "src/ia32/lithium-codegen-ia32.h",
1011 "src/ia32/lithium-gap-resolver-ia32.cc",
1012 "src/ia32/lithium-gap-resolver-ia32.h",
1013 "src/ia32/lithium-ia32.cc",
1014 "src/ia32/lithium-ia32.h",
1015 "src/ia32/macro-assembler-ia32.cc",
1016 "src/ia32/macro-assembler-ia32.h",
1017 "src/ia32/regexp-macro-assembler-ia32.cc",
1018 "src/ia32/regexp-macro-assembler-ia32.h",
1019 "src/compiler/ia32/code-generator-ia32.cc",
1020 "src/compiler/ia32/instruction-codes-ia32.h",
1021 "src/compiler/ia32/instruction-selector-ia32.cc",
1022 "src/compiler/ia32/linkage-ia32.cc",
1023 "src/ic/ia32/access-compiler-ia32.cc",
1024 "src/ic/ia32/handler-compiler-ia32.cc",
1025 "src/ic/ia32/ic-ia32.cc",
1026 "src/ic/ia32/ic-compiler-ia32.cc",
1027 "src/ic/ia32/stub-cache-ia32.cc",
1029 } else if (v8_target_arch == "x64") {
1031 "src/x64/assembler-x64-inl.h",
1032 "src/x64/assembler-x64.cc",
1033 "src/x64/assembler-x64.h",
1034 "src/x64/builtins-x64.cc",
1035 "src/x64/code-stubs-x64.cc",
1036 "src/x64/code-stubs-x64.h",
1037 "src/x64/codegen-x64.cc",
1038 "src/x64/codegen-x64.h",
1039 "src/x64/cpu-x64.cc",
1040 "src/x64/debug-x64.cc",
1041 "src/x64/deoptimizer-x64.cc",
1042 "src/x64/disasm-x64.cc",
1043 "src/x64/frames-x64.cc",
1044 "src/x64/frames-x64.h",
1045 "src/x64/full-codegen-x64.cc",
1046 "src/x64/interface-descriptors-x64.cc",
1047 "src/x64/lithium-codegen-x64.cc",
1048 "src/x64/lithium-codegen-x64.h",
1049 "src/x64/lithium-gap-resolver-x64.cc",
1050 "src/x64/lithium-gap-resolver-x64.h",
1051 "src/x64/lithium-x64.cc",
1052 "src/x64/lithium-x64.h",
1053 "src/x64/macro-assembler-x64.cc",
1054 "src/x64/macro-assembler-x64.h",
1055 "src/x64/regexp-macro-assembler-x64.cc",
1056 "src/x64/regexp-macro-assembler-x64.h",
1057 "src/compiler/x64/code-generator-x64.cc",
1058 "src/compiler/x64/instruction-codes-x64.h",
1059 "src/compiler/x64/instruction-selector-x64.cc",
1060 "src/compiler/x64/linkage-x64.cc",
1061 "src/ic/x64/access-compiler-x64.cc",
1062 "src/ic/x64/handler-compiler-x64.cc",
1063 "src/ic/x64/ic-x64.cc",
1064 "src/ic/x64/ic-compiler-x64.cc",
1065 "src/ic/x64/stub-cache-x64.cc",
1067 } else if (v8_target_arch == "arm") {
1069 "src/arm/assembler-arm-inl.h",
1070 "src/arm/assembler-arm.cc",
1071 "src/arm/assembler-arm.h",
1072 "src/arm/builtins-arm.cc",
1073 "src/arm/code-stubs-arm.cc",
1074 "src/arm/code-stubs-arm.h",
1075 "src/arm/codegen-arm.cc",
1076 "src/arm/codegen-arm.h",
1077 "src/arm/constants-arm.h",
1078 "src/arm/constants-arm.cc",
1079 "src/arm/cpu-arm.cc",
1080 "src/arm/debug-arm.cc",
1081 "src/arm/deoptimizer-arm.cc",
1082 "src/arm/disasm-arm.cc",
1083 "src/arm/frames-arm.cc",
1084 "src/arm/frames-arm.h",
1085 "src/arm/full-codegen-arm.cc",
1086 "src/arm/interface-descriptors-arm.cc",
1087 "src/arm/interface-descriptors-arm.h",
1088 "src/arm/lithium-arm.cc",
1089 "src/arm/lithium-arm.h",
1090 "src/arm/lithium-codegen-arm.cc",
1091 "src/arm/lithium-codegen-arm.h",
1092 "src/arm/lithium-gap-resolver-arm.cc",
1093 "src/arm/lithium-gap-resolver-arm.h",
1094 "src/arm/macro-assembler-arm.cc",
1095 "src/arm/macro-assembler-arm.h",
1096 "src/arm/regexp-macro-assembler-arm.cc",
1097 "src/arm/regexp-macro-assembler-arm.h",
1098 "src/arm/simulator-arm.cc",
1099 "src/compiler/arm/code-generator-arm.cc",
1100 "src/compiler/arm/instruction-codes-arm.h",
1101 "src/compiler/arm/instruction-selector-arm.cc",
1102 "src/compiler/arm/linkage-arm.cc",
1103 "src/ic/arm/access-compiler-arm.cc",
1104 "src/ic/arm/handler-compiler-arm.cc",
1105 "src/ic/arm/ic-arm.cc",
1106 "src/ic/arm/ic-compiler-arm.cc",
1107 "src/ic/arm/stub-cache-arm.cc",
1109 } else if (v8_target_arch == "arm64") {
1111 "src/arm64/assembler-arm64.cc",
1112 "src/arm64/assembler-arm64.h",
1113 "src/arm64/assembler-arm64-inl.h",
1114 "src/arm64/builtins-arm64.cc",
1115 "src/arm64/codegen-arm64.cc",
1116 "src/arm64/codegen-arm64.h",
1117 "src/arm64/code-stubs-arm64.cc",
1118 "src/arm64/code-stubs-arm64.h",
1119 "src/arm64/constants-arm64.h",
1120 "src/arm64/cpu-arm64.cc",
1121 "src/arm64/debug-arm64.cc",
1122 "src/arm64/decoder-arm64.cc",
1123 "src/arm64/decoder-arm64.h",
1124 "src/arm64/decoder-arm64-inl.h",
1125 "src/arm64/deoptimizer-arm64.cc",
1126 "src/arm64/disasm-arm64.cc",
1127 "src/arm64/disasm-arm64.h",
1128 "src/arm64/frames-arm64.cc",
1129 "src/arm64/frames-arm64.h",
1130 "src/arm64/full-codegen-arm64.cc",
1131 "src/arm64/instructions-arm64.cc",
1132 "src/arm64/instructions-arm64.h",
1133 "src/arm64/instrument-arm64.cc",
1134 "src/arm64/instrument-arm64.h",
1135 "src/arm64/interface-descriptors-arm64.cc",
1136 "src/arm64/interface-descriptors-arm64.h",
1137 "src/arm64/lithium-arm64.cc",
1138 "src/arm64/lithium-arm64.h",
1139 "src/arm64/lithium-codegen-arm64.cc",
1140 "src/arm64/lithium-codegen-arm64.h",
1141 "src/arm64/lithium-gap-resolver-arm64.cc",
1142 "src/arm64/lithium-gap-resolver-arm64.h",
1143 "src/arm64/macro-assembler-arm64.cc",
1144 "src/arm64/macro-assembler-arm64.h",
1145 "src/arm64/macro-assembler-arm64-inl.h",
1146 "src/arm64/regexp-macro-assembler-arm64.cc",
1147 "src/arm64/regexp-macro-assembler-arm64.h",
1148 "src/arm64/simulator-arm64.cc",
1149 "src/arm64/simulator-arm64.h",
1150 "src/arm64/utils-arm64.cc",
1151 "src/arm64/utils-arm64.h",
1152 "src/compiler/arm64/code-generator-arm64.cc",
1153 "src/compiler/arm64/instruction-codes-arm64.h",
1154 "src/compiler/arm64/instruction-selector-arm64.cc",
1155 "src/compiler/arm64/linkage-arm64.cc",
1156 "src/ic/arm64/access-compiler-arm64.cc",
1157 "src/ic/arm64/handler-compiler-arm64.cc",
1158 "src/ic/arm64/ic-arm64.cc",
1159 "src/ic/arm64/ic-compiler-arm64.cc",
1160 "src/ic/arm64/stub-cache-arm64.cc",
1162 } else if (v8_target_arch == "mipsel") {
1164 "src/mips/assembler-mips.cc",
1165 "src/mips/assembler-mips.h",
1166 "src/mips/assembler-mips-inl.h",
1167 "src/mips/builtins-mips.cc",
1168 "src/mips/codegen-mips.cc",
1169 "src/mips/codegen-mips.h",
1170 "src/mips/code-stubs-mips.cc",
1171 "src/mips/code-stubs-mips.h",
1172 "src/mips/constants-mips.cc",
1173 "src/mips/constants-mips.h",
1174 "src/mips/cpu-mips.cc",
1175 "src/mips/debug-mips.cc",
1176 "src/mips/deoptimizer-mips.cc",
1177 "src/mips/disasm-mips.cc",
1178 "src/mips/frames-mips.cc",
1179 "src/mips/frames-mips.h",
1180 "src/mips/full-codegen-mips.cc",
1181 "src/mips/interface-descriptors-mips.cc",
1182 "src/mips/lithium-codegen-mips.cc",
1183 "src/mips/lithium-codegen-mips.h",
1184 "src/mips/lithium-gap-resolver-mips.cc",
1185 "src/mips/lithium-gap-resolver-mips.h",
1186 "src/mips/lithium-mips.cc",
1187 "src/mips/lithium-mips.h",
1188 "src/mips/macro-assembler-mips.cc",
1189 "src/mips/macro-assembler-mips.h",
1190 "src/mips/regexp-macro-assembler-mips.cc",
1191 "src/mips/regexp-macro-assembler-mips.h",
1192 "src/mips/simulator-mips.cc",
1193 "src/compiler/mips/code-generator-mips.cc",
1194 "src/compiler/mips/instruction-codes-mips.h",
1195 "src/compiler/mips/instruction-selector-mips.cc",
1196 "src/compiler/mips/linkage-mips.cc",
1197 "src/ic/mips/access-compiler-mips.cc",
1198 "src/ic/mips/handler-compiler-mips.cc",
1199 "src/ic/mips/ic-mips.cc",
1200 "src/ic/mips/ic-compiler-mips.cc",
1201 "src/ic/mips/stub-cache-mips.cc",
1203 } else if (v8_target_arch == "mips64el") {
1205 "src/mips64/assembler-mips64.cc",
1206 "src/mips64/assembler-mips64.h",
1207 "src/mips64/assembler-mips64-inl.h",
1208 "src/mips64/builtins-mips64.cc",
1209 "src/mips64/codegen-mips64.cc",
1210 "src/mips64/codegen-mips64.h",
1211 "src/mips64/code-stubs-mips64.cc",
1212 "src/mips64/code-stubs-mips64.h",
1213 "src/mips64/constants-mips64.cc",
1214 "src/mips64/constants-mips64.h",
1215 "src/mips64/cpu-mips64.cc",
1216 "src/mips64/debug-mips64.cc",
1217 "src/mips64/deoptimizer-mips64.cc",
1218 "src/mips64/disasm-mips64.cc",
1219 "src/mips64/frames-mips64.cc",
1220 "src/mips64/frames-mips64.h",
1221 "src/mips64/full-codegen-mips64.cc",
1222 "src/mips64/interface-descriptors-mips64.cc",
1223 "src/mips64/lithium-codegen-mips64.cc",
1224 "src/mips64/lithium-codegen-mips64.h",
1225 "src/mips64/lithium-gap-resolver-mips64.cc",
1226 "src/mips64/lithium-gap-resolver-mips64.h",
1227 "src/mips64/lithium-mips64.cc",
1228 "src/mips64/lithium-mips64.h",
1229 "src/mips64/macro-assembler-mips64.cc",
1230 "src/mips64/macro-assembler-mips64.h",
1231 "src/mips64/regexp-macro-assembler-mips64.cc",
1232 "src/mips64/regexp-macro-assembler-mips64.h",
1233 "src/mips64/simulator-mips64.cc",
1234 "src/ic/mips64/access-compiler-mips64.cc",
1235 "src/ic/mips64/handler-compiler-mips64.cc",
1236 "src/ic/mips64/ic-mips64.cc",
1237 "src/ic/mips64/ic-compiler-mips64.cc",
1238 "src/ic/mips64/stub-cache-mips64.cc",
1242 configs -= [ "//build/config/compiler:chromium_code" ]
1243 configs += [ "//build/config/compiler:no_chromium_code" ]
1251 configs -= [ "//build/config/compiler:optimize" ]
1252 configs += [ "//build/config/compiler:optimize_max" ]
1261 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1262 cflags = [ "/wd4267" ]
1265 if (v8_enable_i18n_support) {
1266 deps += [ "//third_party/icu" ]
1268 deps += [ "//third_party/icu:icudata" ]
1271 # TODO(jochen): Add support for icu_use_data_file_flag
1272 defines += [ "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE" ]
1280 if (v8_postmortem_support) {
1281 sources += [ "$target_gen_dir/debug-support.cc" ]
1282 deps += [ ":postmortem-metadata" ]
1286 source_set("v8_libbase") {
1287 visibility = [ ":*" ] # Only targets in this file can depend on this.
1290 "src/base/atomicops.h",
1291 "src/base/atomicops_internals_arm64_gcc.h",
1292 "src/base/atomicops_internals_arm_gcc.h",
1293 "src/base/atomicops_internals_atomicword_compat.h",
1294 "src/base/atomicops_internals_mac.h",
1295 "src/base/atomicops_internals_mips_gcc.h",
1296 "src/base/atomicops_internals_tsan.h",
1297 "src/base/atomicops_internals_x86_gcc.cc",
1298 "src/base/atomicops_internals_x86_gcc.h",
1299 "src/base/atomicops_internals_x86_msvc.h",
1302 "src/base/build_config.h",
1305 "src/base/division-by-constant.cc",
1306 "src/base/division-by-constant.h",
1308 "src/base/functional.cc",
1309 "src/base/functional.h",
1310 "src/base/iterator.h",
1311 "src/base/lazy-instance.h",
1312 "src/base/logging.cc",
1313 "src/base/logging.h",
1314 "src/base/macros.h",
1317 "src/base/platform/elapsed-timer.h",
1318 "src/base/platform/time.cc",
1319 "src/base/platform/time.h",
1320 "src/base/platform/condition-variable.cc",
1321 "src/base/platform/condition-variable.h",
1322 "src/base/platform/mutex.cc",
1323 "src/base/platform/mutex.h",
1324 "src/base/platform/platform.h",
1325 "src/base/platform/semaphore.cc",
1326 "src/base/platform/semaphore.h",
1327 "src/base/safe_conversions.h",
1328 "src/base/safe_conversions_impl.h",
1329 "src/base/safe_math.h",
1330 "src/base/safe_math_impl.h",
1331 "src/base/sys-info.cc",
1332 "src/base/sys-info.h",
1333 "src/base/utils/random-number-generator.cc",
1334 "src/base/utils/random-number-generator.h",
1337 configs -= [ "//build/config/compiler:chromium_code" ]
1338 configs += [ "//build/config/compiler:no_chromium_code" ]
1340 ":internal_config_base",
1346 configs -= [ "//build/config/compiler:optimize" ]
1347 configs += [ "//build/config/compiler:optimize_max" ]
1353 sources += [ "src/base/platform/platform-posix.cc" ]
1357 sources += [ "src/base/platform/platform-linux.cc" ]
1360 } else if (is_android) {
1361 defines += [ "CAN_USE_VFP_INSTRUCTIONS" ]
1363 if (build_os == "mac") {
1364 if (current_toolchain == host_toolchain) {
1365 sources += [ "src/base/platform/platform-macos.cc" ]
1367 sources += [ "src/base/platform/platform-linux.cc" ]
1370 sources += [ "src/base/platform/platform-linux.cc" ]
1371 if (current_toolchain == host_toolchain) {
1372 defines += [ "V8_LIBRT_NOT_AVAILABLE" ]
1375 } else if (is_mac) {
1376 sources += [ "src/base/platform/platform-macos.cc" ]
1377 } else if (is_win) {
1378 # TODO(jochen): Add support for cygwin.
1380 "src/base/platform/platform-win32.cc",
1381 "src/base/win32-headers.h",
1384 defines += [ "_CRT_RAND_S" ] # for rand_s()
1392 # TODO(jochen): Add support for qnx, freebsd, openbsd, netbsd, and solaris.
1395 source_set("v8_libplatform") {
1397 "include/libplatform/libplatform.h",
1398 "src/libplatform/default-platform.cc",
1399 "src/libplatform/default-platform.h",
1400 "src/libplatform/task-queue.cc",
1401 "src/libplatform/task-queue.h",
1402 "src/libplatform/worker-thread.cc",
1403 "src/libplatform/worker-thread.h",
1406 configs -= [ "//build/config/compiler:chromium_code" ]
1407 configs += [ "//build/config/compiler:no_chromium_code" ]
1409 ":internal_config_base",
1415 configs -= [ "//build/config/compiler:optimize" ]
1416 configs += [ "//build/config/compiler:optimize_max" ]
1424 ###############################################################################
1428 if (current_toolchain == host_toolchain) {
1429 executable("mksnapshot") {
1430 visibility = [ ":*" ] # Only targets in this file can depend on this.
1433 "src/mksnapshot.cc",
1436 configs -= [ "//build/config/compiler:chromium_code" ]
1437 configs += [ "//build/config/compiler:no_chromium_code" ]
1448 "//build/config/sanitizers:deps",
1453 ###############################################################################
1457 if (component_mode == "shared_library") {
1460 "src/v8dll-main.cc",
1463 if (v8_use_snapshot && v8_use_external_startup_data) {
1466 ":v8_external_snapshot",
1468 } else if (v8_use_snapshot) {
1474 assert(!v8_use_external_startup_data)
1481 configs -= [ "//build/config/compiler:chromium_code" ]
1482 configs += [ "//build/config/compiler:no_chromium_code" ]
1489 direct_dependent_configs = [ ":external_config" ]
1492 if (is_android && current_toolchain != host_toolchain) {
1498 if (v8_use_snapshot && v8_use_external_startup_data) {
1501 ":v8_external_snapshot",
1503 } else if (v8_use_snapshot) {
1509 assert(!v8_use_external_startup_data)
1516 direct_dependent_configs = [ ":external_config" ]
1520 if ((current_toolchain == host_toolchain && v8_toolset_for_d8 == "host") ||
1521 (current_toolchain != host_toolchain && v8_toolset_for_d8 == "target")) {
1526 "src/startup-data-util.h",
1527 "src/startup-data-util.cc",
1530 configs -= [ "//build/config/compiler:chromium_code" ]
1531 configs += [ "//build/config/compiler:no_chromium_code" ]
1542 "//build/config/sanitizers:deps",
1545 # TODO(jochen): Add support for readline and vtunejit.
1548 sources += [ "src/d8-posix.cc" ]
1549 } else if (is_win) {
1550 sources += [ "src/d8-windows.cc" ]
1553 if (component_mode != "shared_library") {
1556 "$target_gen_dir/d8-js.cc",
1559 if (v8_enable_i18n_support) {
1560 deps += [ "//third_party/icu" ]