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 # TODO(jochen): These will need to be user-settable to support standalone V8
7 v8_compress_startup_data = "off"
8 v8_deprecation_warnings = false
9 v8_enable_disassembler = false
10 v8_enable_gdbjit = false
11 v8_enable_handle_zapping = true
12 v8_enable_i18n_support = true
13 v8_enable_verify_heap = false
14 v8_interpreted_regexp = false
15 v8_object_print = false
16 v8_postmortem_support = false
17 v8_use_snapshot = true
18 v8_use_external_startup_data = false
19 v8_enable_extra_checks = is_debug
20 v8_target_arch = cpu_arch
21 v8_random_seed = "314159265"
24 ###############################################################################
27 config("internal_config") {
28 visibility = [ ":*" ] # Only targets in this file can depend on this.
30 include_dirs = [ "." ]
32 if (component_mode == "shared_library") {
40 config("internal_config_base") {
41 visibility = [ ":*" ] # Only targets in this file can depend on this.
43 include_dirs = [ "." ]
46 # This config should only be applied to code using V8 and not any V8 code
48 config("external_config") {
49 if (is_component_build) {
55 include_dirs = [ "include" ]
59 visibility = [ ":*" ] # Only targets in this file can depend on this.
63 if (v8_enable_disassembler == true) {
65 "ENABLE_DISASSEMBLER",
68 if (v8_enable_gdbjit == true) {
70 "ENABLE_GDB_JIT_INTERFACE",
73 if (v8_object_print == true) {
78 if (v8_enable_verify_heap == true) {
83 if (v8_interpreted_regexp == true) {
85 "V8_INTERPRETED_REGEXP",
88 if (v8_deprecation_warnings == true) {
90 "V8_DEPRECATION_WARNINGS",
93 if (v8_enable_i18n_support == true) {
98 if (v8_compress_startup_data == "bz2") {
100 "COMPRESS_STARTUP_DATA_BZ2",
103 if (v8_enable_extra_checks == true) {
105 "ENABLE_EXTRA_CHECKS",
108 if (v8_enable_handle_zapping == true) {
110 "ENABLE_HANDLE_ZAPPING",
113 if (v8_use_external_startup_data == true) {
115 "V8_USE_EXTERNAL_STARTUP_DATA",
120 config("toolchain") {
121 visibility = [ ":*" ] # Only targets in this file can depend on this.
126 # TODO(jochen): Add support for arm, mips, mipsel.
128 if (v8_target_arch == "arm64") {
130 "V8_TARGET_ARCH_ARM64",
133 if (v8_target_arch == "x86") {
135 "V8_TARGET_ARCH_IA32",
138 if (v8_target_arch == "x64") {
140 "V8_TARGET_ARCH_X64",
147 # TODO(jochen): Support v8_enable_prof.
150 # TODO(jochen): Add support for compiling with simulators.
153 # TODO(jochen): Add support for different debug optimization levels.
155 "ENABLE_DISASSEMBLER",
165 ###############################################################################
170 visibility = [ ":*" ] # Only targets in this file can depend on this.
172 script = "tools/js2c.py"
174 # The script depends on this other script, this rule causes a rebuild if it
176 source_prereqs = [ "tools/jsmin.py" ]
185 "src/third_party/fdlibm/fdlibm.js",
190 "src/arraybuffer.js",
193 "src/object-observe.js",
195 "src/weak-collection.js",
196 "src/collection-iterator.js",
200 "src/array-iterator.js",
201 "src/string-iterator.js",
202 "src/debug-debugger.js",
203 "src/mirror-debugger.js",
204 "src/liveedit-debugger.js",
209 "$target_gen_dir/libraries.cc"
212 if (v8_enable_i18n_support) {
213 sources += [ "src/i18n.js" ]
217 rebase_path("$target_gen_dir/libraries.cc", root_build_dir),
219 v8_compress_startup_data
220 ] + rebase_path(sources, root_build_dir)
222 if (v8_use_external_startup_data) {
223 outputs += [ "$target_gen_dir/libraries.bin" ]
226 rebase_path("$target_gen_dir/libraries.bin", root_build_dir)
231 action("js2c_experimental") {
232 visibility = [ ":*" ] # Only targets in this file can depend on this.
234 script = "tools/js2c.py"
236 # The script depends on this other script, this rule causes a rebuild if it
238 source_prereqs = [ "tools/jsmin.py" ]
244 "src/harmony-string.js",
245 "src/harmony-array.js",
246 "src/harmony-typedarray.js",
247 "src/harmony-classes.js",
248 "src/harmony-tostring.js"
252 "$target_gen_dir/experimental-libraries.cc"
256 rebase_path("$target_gen_dir/experimental-libraries.cc", root_build_dir),
258 v8_compress_startup_data
259 ] + rebase_path(sources, root_build_dir)
261 if (v8_use_external_startup_data) {
262 outputs += [ "$target_gen_dir/libraries_experimental.bin" ]
265 rebase_path("$target_gen_dir/libraries_experimental.bin", root_build_dir)
270 if (v8_use_external_startup_data) {
271 action("natives_blob") {
272 visibility = [ ":*" ] # Only targets in this file can depend on this.
280 "$target_gen_dir/libraries.bin",
281 "$target_gen_dir/libraries_experimental.bin"
285 "$root_gen_dir/natives_blob.bin"
288 script = "tools/concatenate-files.py"
290 args = rebase_path(sources + outputs, root_build_dir)
294 action("postmortem-metadata") {
295 visibility = [ ":*" ] # Only targets in this file can depend on this.
297 script = "tools/gen-postmortem-metadata.py"
305 "$target_gen_dir/debug-support.cc"
309 rebase_path(outputs, root_build_dir) +
310 rebase_path(sources, root_build_dir)
313 action("run_mksnapshot") {
314 visibility = [ ":*" ] # Only targets in this file can depend on this.
316 deps = [ ":mksnapshot($host_toolchain)" ]
318 script = "tools/run.py"
321 "$target_gen_dir/snapshot.cc"
325 "./" + rebase_path(get_label_info(":mksnapshot($host_toolchain)",
326 "root_out_dir") + "/mksnapshot",
328 "--log-snapshot-positions",
329 "--logfile", rebase_path("$target_gen_dir/snapshot.log", root_build_dir),
330 rebase_path("$target_gen_dir/snapshot.cc", root_build_dir)
333 if (v8_random_seed != "0") {
334 args += [ "--random-seed", v8_random_seed ]
337 if (v8_use_external_startup_data) {
338 outputs += [ "$root_gen_dir/snapshot_blob.bin" ]
341 rebase_path("$root_gen_dir/snapshot_blob.bin", root_build_dir)
347 ###############################################################################
348 # Source Sets (aka static libraries)
351 source_set("v8_nosnapshot") {
352 visibility = [ ":*" ] # Only targets in this file can depend on this.
356 ":js2c_experimental",
361 "$target_gen_dir/libraries.cc",
362 "$target_gen_dir/experimental-libraries.cc",
363 "src/snapshot-empty.cc",
364 "src/snapshot-common.cc",
367 configs -= [ "//build/config/compiler:chromium_code" ]
368 configs += [ "//build/config/compiler:no_chromium_code" ]
369 configs += [ ":internal_config", ":features", ":toolchain" ]
372 source_set("v8_snapshot") {
373 visibility = [ ":*" ] # Only targets in this file can depend on this.
377 ":js2c_experimental",
383 "$target_gen_dir/libraries.cc",
384 "$target_gen_dir/experimental-libraries.cc",
385 "$target_gen_dir/snapshot.cc",
386 "src/snapshot-common.cc",
389 configs -= [ "//build/config/compiler:chromium_code" ]
390 configs += [ "//build/config/compiler:no_chromium_code" ]
391 configs += [ ":internal_config", ":features", ":toolchain" ]
394 if (v8_use_external_startup_data) {
395 source_set("v8_external_snapshot") {
396 visibility = [ ":*" ] # Only targets in this file can depend on this.
400 ":js2c_experimental",
407 "src/natives-external.cc",
408 "src/snapshot-external.cc",
411 configs -= [ "//build/config/compiler:chromium_code" ]
412 configs += [ "//build/config/compiler:no_chromium_code" ]
413 configs += [ ":internal_config", ":features", ":toolchain" ]
417 source_set("v8_base") {
418 visibility = [ ":*" ] # Only targets in this file can depend on this.
425 "src/allocation-site-scopes.cc",
426 "src/allocation-site-scopes.h",
427 "src/allocation-tracker.cc",
428 "src/allocation-tracker.h",
435 "src/assert-scope.h",
436 "src/assert-scope.cc",
437 "src/ast-numbering.cc",
438 "src/ast-numbering.h",
439 "src/ast-value-factory.cc",
440 "src/ast-value-factory.h",
443 "src/background-parsing-task.cc",
444 "src/background-parsing-task.h",
445 "src/bailout-reason.cc",
446 "src/bailout-reason.h",
447 "src/basic-block-profiler.cc",
448 "src/basic-block-profiler.h",
449 "src/bignum-dtoa.cc",
455 "src/bootstrapper.cc",
456 "src/bootstrapper.h",
459 "src/bytecodes-irregexp.h",
460 "src/cached-powers.cc",
461 "src/cached-powers.h",
462 "src/char-predicates.cc",
463 "src/char-predicates-inl.h",
464 "src/char-predicates.h",
467 "src/circular-queue-inl.h",
468 "src/circular-queue.h",
469 "src/code-factory.cc",
470 "src/code-factory.h",
473 "src/code-stubs-hydrogen.cc",
477 "src/compilation-cache.cc",
478 "src/compilation-cache.h",
479 "src/compilation-statistics.cc",
480 "src/compilation-statistics.h",
481 "src/compiler/access-builder.cc",
482 "src/compiler/access-builder.h",
483 "src/compiler/ast-graph-builder.cc",
484 "src/compiler/ast-graph-builder.h",
485 "src/compiler/ast-loop-assignment-analyzer.cc",
486 "src/compiler/ast-loop-assignment-analyzer.h",
487 "src/compiler/basic-block-instrumentor.cc",
488 "src/compiler/basic-block-instrumentor.h",
489 "src/compiler/change-lowering.cc",
490 "src/compiler/change-lowering.h",
491 "src/compiler/code-generator-impl.h",
492 "src/compiler/code-generator.cc",
493 "src/compiler/code-generator.h",
494 "src/compiler/common-node-cache.h",
495 "src/compiler/common-operator.cc",
496 "src/compiler/common-operator.h",
497 "src/compiler/control-builders.cc",
498 "src/compiler/control-builders.h",
499 "src/compiler/control-reducer.cc",
500 "src/compiler/control-reducer.h",
501 "src/compiler/diamond.h",
502 "src/compiler/frame.h",
503 "src/compiler/gap-resolver.cc",
504 "src/compiler/gap-resolver.h",
505 "src/compiler/generic-algorithm-inl.h",
506 "src/compiler/generic-algorithm.h",
507 "src/compiler/generic-graph.h",
508 "src/compiler/generic-node-inl.h",
509 "src/compiler/generic-node.h",
510 "src/compiler/graph-builder.cc",
511 "src/compiler/graph-builder.h",
512 "src/compiler/graph-inl.h",
513 "src/compiler/graph-reducer.cc",
514 "src/compiler/graph-reducer.h",
515 "src/compiler/graph-replay.cc",
516 "src/compiler/graph-replay.h",
517 "src/compiler/graph-visualizer.cc",
518 "src/compiler/graph-visualizer.h",
519 "src/compiler/graph.cc",
520 "src/compiler/graph.h",
521 "src/compiler/instruction-codes.h",
522 "src/compiler/instruction-selector-impl.h",
523 "src/compiler/instruction-selector.cc",
524 "src/compiler/instruction-selector.h",
525 "src/compiler/instruction.cc",
526 "src/compiler/instruction.h",
527 "src/compiler/js-builtin-reducer.cc",
528 "src/compiler/js-builtin-reducer.h",
529 "src/compiler/js-context-specialization.cc",
530 "src/compiler/js-context-specialization.h",
531 "src/compiler/js-generic-lowering.cc",
532 "src/compiler/js-generic-lowering.h",
533 "src/compiler/js-graph.cc",
534 "src/compiler/js-graph.h",
535 "src/compiler/js-inlining.cc",
536 "src/compiler/js-inlining.h",
537 "src/compiler/js-intrinsic-builder.cc",
538 "src/compiler/js-intrinsic-builder.h",
539 "src/compiler/js-operator.cc",
540 "src/compiler/js-operator.h",
541 "src/compiler/js-typed-lowering.cc",
542 "src/compiler/js-typed-lowering.h",
543 "src/compiler/linkage-impl.h",
544 "src/compiler/linkage.cc",
545 "src/compiler/linkage.h",
546 "src/compiler/machine-operator-reducer.cc",
547 "src/compiler/machine-operator-reducer.h",
548 "src/compiler/machine-operator.cc",
549 "src/compiler/machine-operator.h",
550 "src/compiler/machine-type.cc",
551 "src/compiler/machine-type.h",
552 "src/compiler/node-aux-data-inl.h",
553 "src/compiler/node-aux-data.h",
554 "src/compiler/node-cache.cc",
555 "src/compiler/node-cache.h",
556 "src/compiler/node-matchers.h",
557 "src/compiler/node-properties-inl.h",
558 "src/compiler/node-properties.h",
559 "src/compiler/node.cc",
560 "src/compiler/node.h",
561 "src/compiler/opcodes.h",
562 "src/compiler/operator-properties-inl.h",
563 "src/compiler/operator-properties.h",
564 "src/compiler/operator.cc",
565 "src/compiler/operator.h",
566 "src/compiler/phi-reducer.h",
567 "src/compiler/pipeline.cc",
568 "src/compiler/pipeline.h",
569 "src/compiler/pipeline-statistics.cc",
570 "src/compiler/pipeline-statistics.h",
571 "src/compiler/raw-machine-assembler.cc",
572 "src/compiler/raw-machine-assembler.h",
573 "src/compiler/register-allocator.cc",
574 "src/compiler/register-allocator.h",
575 "src/compiler/register-configuration.cc",
576 "src/compiler/register-configuration.h",
577 "src/compiler/representation-change.h",
578 "src/compiler/schedule.cc",
579 "src/compiler/schedule.h",
580 "src/compiler/scheduler.cc",
581 "src/compiler/scheduler.h",
582 "src/compiler/select-lowering.cc",
583 "src/compiler/select-lowering.h",
584 "src/compiler/simplified-lowering.cc",
585 "src/compiler/simplified-lowering.h",
586 "src/compiler/simplified-operator-reducer.cc",
587 "src/compiler/simplified-operator-reducer.h",
588 "src/compiler/simplified-operator.cc",
589 "src/compiler/simplified-operator.h",
590 "src/compiler/source-position.cc",
591 "src/compiler/source-position.h",
592 "src/compiler/typer.cc",
593 "src/compiler/typer.h",
594 "src/compiler/value-numbering-reducer.cc",
595 "src/compiler/value-numbering-reducer.h",
596 "src/compiler/verifier.cc",
597 "src/compiler/verifier.h",
598 "src/compiler/zone-pool.cc",
599 "src/compiler/zone-pool.h",
604 "src/conversions-inl.h",
605 "src/conversions.cc",
609 "src/cpu-profiler-inl.h",
610 "src/cpu-profiler.cc",
611 "src/cpu-profiler.h",
614 "src/dateparser-inl.h",
619 "src/deoptimizer.cc",
622 "src/disassembler.cc",
623 "src/disassembler.h",
630 "src/elements-kind.cc",
631 "src/elements-kind.h",
636 "src/extensions/externalize-string-extension.cc",
637 "src/extensions/externalize-string-extension.h",
638 "src/extensions/free-buffer-extension.cc",
639 "src/extensions/free-buffer-extension.h",
640 "src/extensions/gc-extension.cc",
641 "src/extensions/gc-extension.h",
642 "src/extensions/statistics-extension.cc",
643 "src/extensions/statistics-extension.h",
644 "src/extensions/trigger-failure-extension.cc",
645 "src/extensions/trigger-failure-extension.h",
651 "src/field-index-inl.h",
654 "src/flag-definitions.h",
660 "src/full-codegen.cc",
661 "src/full-codegen.h",
662 "src/func-name-inferrer.cc",
663 "src/func-name-inferrer.h",
666 "src/global-handles.cc",
667 "src/global-handles.h",
673 "src/heap-profiler.cc",
674 "src/heap-profiler.h",
675 "src/heap-snapshot-generator-inl.h",
676 "src/heap-snapshot-generator.cc",
677 "src/heap-snapshot-generator.h",
678 "src/heap/gc-idle-time-handler.cc",
679 "src/heap/gc-idle-time-handler.h",
680 "src/heap/gc-tracer.cc",
681 "src/heap/gc-tracer.h",
682 "src/heap/heap-inl.h",
685 "src/heap/incremental-marking.cc",
686 "src/heap/incremental-marking.h",
687 "src/heap/mark-compact-inl.h",
688 "src/heap/mark-compact.cc",
689 "src/heap/mark-compact.h",
690 "src/heap/objects-visiting-inl.h",
691 "src/heap/objects-visiting.cc",
692 "src/heap/objects-visiting.h",
693 "src/heap/spaces-inl.h",
694 "src/heap/spaces.cc",
696 "src/heap/store-buffer-inl.h",
697 "src/heap/store-buffer.cc",
698 "src/heap/store-buffer.h",
699 "src/hydrogen-alias-analysis.h",
700 "src/hydrogen-bce.cc",
701 "src/hydrogen-bce.h",
702 "src/hydrogen-bch.cc",
703 "src/hydrogen-bch.h",
704 "src/hydrogen-canonicalize.cc",
705 "src/hydrogen-canonicalize.h",
706 "src/hydrogen-check-elimination.cc",
707 "src/hydrogen-check-elimination.h",
708 "src/hydrogen-dce.cc",
709 "src/hydrogen-dce.h",
710 "src/hydrogen-dehoist.cc",
711 "src/hydrogen-dehoist.h",
712 "src/hydrogen-environment-liveness.cc",
713 "src/hydrogen-environment-liveness.h",
714 "src/hydrogen-escape-analysis.cc",
715 "src/hydrogen-escape-analysis.h",
716 "src/hydrogen-flow-engine.h",
717 "src/hydrogen-instructions.cc",
718 "src/hydrogen-instructions.h",
721 "src/hydrogen-gvn.cc",
722 "src/hydrogen-gvn.h",
723 "src/hydrogen-infer-representation.cc",
724 "src/hydrogen-infer-representation.h",
725 "src/hydrogen-infer-types.cc",
726 "src/hydrogen-infer-types.h",
727 "src/hydrogen-load-elimination.cc",
728 "src/hydrogen-load-elimination.h",
729 "src/hydrogen-mark-deoptimize.cc",
730 "src/hydrogen-mark-deoptimize.h",
731 "src/hydrogen-mark-unreachable.cc",
732 "src/hydrogen-mark-unreachable.h",
733 "src/hydrogen-osr.cc",
734 "src/hydrogen-osr.h",
735 "src/hydrogen-range-analysis.cc",
736 "src/hydrogen-range-analysis.h",
737 "src/hydrogen-redundant-phi.cc",
738 "src/hydrogen-redundant-phi.h",
739 "src/hydrogen-removable-simulates.cc",
740 "src/hydrogen-removable-simulates.h",
741 "src/hydrogen-representation-changes.cc",
742 "src/hydrogen-representation-changes.h",
743 "src/hydrogen-sce.cc",
744 "src/hydrogen-sce.h",
745 "src/hydrogen-store-elimination.cc",
746 "src/hydrogen-store-elimination.h",
747 "src/hydrogen-types.cc",
748 "src/hydrogen-types.h",
749 "src/hydrogen-uint32-analysis.cc",
750 "src/hydrogen-uint32-analysis.h",
755 "src/ic/access-compiler.cc",
756 "src/ic/access-compiler.h",
757 "src/ic/call-optimization.cc",
758 "src/ic/call-optimization.h",
759 "src/ic/handler-compiler.cc",
760 "src/ic/handler-compiler.h",
762 "src/ic/ic-state.cc",
766 "src/ic/ic-compiler.cc",
767 "src/ic/ic-compiler.h",
768 "src/ic/stub-cache.cc",
769 "src/ic/stub-cache.h",
772 "src/interface-descriptors.cc",
773 "src/interface-descriptors.h",
774 "src/interpreter-irregexp.cc",
775 "src/interpreter-irregexp.h",
779 "src/json-stringifier.h",
780 "src/jsregexp-inl.h",
785 "src/lithium-allocator-inl.h",
786 "src/lithium-allocator.cc",
787 "src/lithium-allocator.h",
788 "src/lithium-codegen.cc",
789 "src/lithium-codegen.h",
802 "src/macro-assembler.h",
807 "src/objects-debug.cc",
809 "src/objects-printer.cc",
812 "src/optimizing-compiler-thread.cc",
813 "src/optimizing-compiler-thread.h",
820 "src/preparse-data-format.h",
821 "src/preparse-data.cc",
822 "src/preparse-data.h",
825 "src/prettyprinter.cc",
826 "src/prettyprinter.h",
827 "src/profile-generator-inl.h",
828 "src/profile-generator.cc",
829 "src/profile-generator.h",
830 "src/property-details.h",
834 "src/regexp-macro-assembler-irregexp-inl.h",
835 "src/regexp-macro-assembler-irregexp.cc",
836 "src/regexp-macro-assembler-irregexp.h",
837 "src/regexp-macro-assembler-tracer.cc",
838 "src/regexp-macro-assembler-tracer.h",
839 "src/regexp-macro-assembler.cc",
840 "src/regexp-macro-assembler.h",
841 "src/regexp-stack.cc",
842 "src/regexp-stack.h",
845 "src/runtime-profiler.cc",
846 "src/runtime-profiler.h",
847 "src/runtime/runtime-api.cc",
848 "src/runtime/runtime-array.cc",
849 "src/runtime/runtime-classes.cc",
850 "src/runtime/runtime-collections.cc",
851 "src/runtime/runtime-compiler.cc",
852 "src/runtime/runtime-date.cc",
853 "src/runtime/runtime-debug.cc",
854 "src/runtime/runtime-function.cc",
855 "src/runtime/runtime-generator.cc",
856 "src/runtime/runtime-i18n.cc",
857 "src/runtime/runtime-internal.cc",
858 "src/runtime/runtime-json.cc",
859 "src/runtime/runtime-literals.cc",
860 "src/runtime/runtime-liveedit.cc",
861 "src/runtime/runtime-maths.cc",
862 "src/runtime/runtime-numbers.cc",
863 "src/runtime/runtime-object.cc",
864 "src/runtime/runtime-observe.cc",
865 "src/runtime/runtime-proxy.cc",
866 "src/runtime/runtime-regexp.cc",
867 "src/runtime/runtime-scopes.cc",
868 "src/runtime/runtime-strings.cc",
869 "src/runtime/runtime-symbol.cc",
870 "src/runtime/runtime-test.cc",
871 "src/runtime/runtime-typedarray.cc",
872 "src/runtime/runtime-uri.cc",
873 "src/runtime/runtime-utils.h",
874 "src/runtime/runtime.cc",
875 "src/runtime/runtime.h",
876 "src/runtime/string-builder.h",
877 "src/safepoint-table.cc",
878 "src/safepoint-table.h",
881 "src/scanner-character-streams.cc",
882 "src/scanner-character-streams.h",
891 "src/small-pointer-list.h",
892 "src/smart-pointers.h",
893 "src/snapshot-source-sink.cc",
894 "src/snapshot-source-sink.h",
896 "src/string-search.cc",
897 "src/string-search.h",
898 "src/string-stream.cc",
899 "src/string-stream.h",
904 "src/transitions-inl.h",
905 "src/transitions.cc",
907 "src/type-feedback-vector-inl.h",
908 "src/type-feedback-vector.cc",
909 "src/type-feedback-vector.h",
917 "src/unbound-queue-inl.h",
918 "src/unbound-queue.h",
922 "src/unicode-decoder.cc",
923 "src/unicode-decoder.h",
937 "src/vm-state-inl.h",
942 "src/third_party/fdlibm/fdlibm.cc",
943 "src/third_party/fdlibm/fdlibm.h",
946 if (v8_target_arch == "x86") {
948 "src/ia32/assembler-ia32-inl.h",
949 "src/ia32/assembler-ia32.cc",
950 "src/ia32/assembler-ia32.h",
951 "src/ia32/builtins-ia32.cc",
952 "src/ia32/code-stubs-ia32.cc",
953 "src/ia32/code-stubs-ia32.h",
954 "src/ia32/codegen-ia32.cc",
955 "src/ia32/codegen-ia32.h",
956 "src/ia32/cpu-ia32.cc",
957 "src/ia32/debug-ia32.cc",
958 "src/ia32/deoptimizer-ia32.cc",
959 "src/ia32/disasm-ia32.cc",
960 "src/ia32/frames-ia32.cc",
961 "src/ia32/frames-ia32.h",
962 "src/ia32/full-codegen-ia32.cc",
963 "src/ia32/interface-descriptors-ia32.cc",
964 "src/ia32/lithium-codegen-ia32.cc",
965 "src/ia32/lithium-codegen-ia32.h",
966 "src/ia32/lithium-gap-resolver-ia32.cc",
967 "src/ia32/lithium-gap-resolver-ia32.h",
968 "src/ia32/lithium-ia32.cc",
969 "src/ia32/lithium-ia32.h",
970 "src/ia32/macro-assembler-ia32.cc",
971 "src/ia32/macro-assembler-ia32.h",
972 "src/ia32/regexp-macro-assembler-ia32.cc",
973 "src/ia32/regexp-macro-assembler-ia32.h",
974 "src/compiler/ia32/code-generator-ia32.cc",
975 "src/compiler/ia32/instruction-codes-ia32.h",
976 "src/compiler/ia32/instruction-selector-ia32.cc",
977 "src/compiler/ia32/linkage-ia32.cc",
978 "src/ic/ia32/access-compiler-ia32.cc",
979 "src/ic/ia32/handler-compiler-ia32.cc",
980 "src/ic/ia32/ic-ia32.cc",
981 "src/ic/ia32/ic-compiler-ia32.cc",
982 "src/ic/ia32/stub-cache-ia32.cc",
984 } else if (v8_target_arch == "x64") {
986 "src/x64/assembler-x64-inl.h",
987 "src/x64/assembler-x64.cc",
988 "src/x64/assembler-x64.h",
989 "src/x64/builtins-x64.cc",
990 "src/x64/code-stubs-x64.cc",
991 "src/x64/code-stubs-x64.h",
992 "src/x64/codegen-x64.cc",
993 "src/x64/codegen-x64.h",
994 "src/x64/cpu-x64.cc",
995 "src/x64/debug-x64.cc",
996 "src/x64/deoptimizer-x64.cc",
997 "src/x64/disasm-x64.cc",
998 "src/x64/frames-x64.cc",
999 "src/x64/frames-x64.h",
1000 "src/x64/full-codegen-x64.cc",
1001 "src/x64/interface-descriptors-x64.cc",
1002 "src/x64/lithium-codegen-x64.cc",
1003 "src/x64/lithium-codegen-x64.h",
1004 "src/x64/lithium-gap-resolver-x64.cc",
1005 "src/x64/lithium-gap-resolver-x64.h",
1006 "src/x64/lithium-x64.cc",
1007 "src/x64/lithium-x64.h",
1008 "src/x64/macro-assembler-x64.cc",
1009 "src/x64/macro-assembler-x64.h",
1010 "src/x64/regexp-macro-assembler-x64.cc",
1011 "src/x64/regexp-macro-assembler-x64.h",
1012 "src/compiler/x64/code-generator-x64.cc",
1013 "src/compiler/x64/instruction-codes-x64.h",
1014 "src/compiler/x64/instruction-selector-x64.cc",
1015 "src/compiler/x64/linkage-x64.cc",
1016 "src/ic/x64/access-compiler-x64.cc",
1017 "src/ic/x64/handler-compiler-x64.cc",
1018 "src/ic/x64/ic-x64.cc",
1019 "src/ic/x64/ic-compiler-x64.cc",
1020 "src/ic/x64/stub-cache-x64.cc",
1022 } else if (v8_target_arch == "arm") {
1024 "src/arm/assembler-arm-inl.h",
1025 "src/arm/assembler-arm.cc",
1026 "src/arm/assembler-arm.h",
1027 "src/arm/builtins-arm.cc",
1028 "src/arm/code-stubs-arm.cc",
1029 "src/arm/code-stubs-arm.h",
1030 "src/arm/codegen-arm.cc",
1031 "src/arm/codegen-arm.h",
1032 "src/arm/constants-arm.h",
1033 "src/arm/constants-arm.cc",
1034 "src/arm/cpu-arm.cc",
1035 "src/arm/debug-arm.cc",
1036 "src/arm/deoptimizer-arm.cc",
1037 "src/arm/disasm-arm.cc",
1038 "src/arm/frames-arm.cc",
1039 "src/arm/frames-arm.h",
1040 "src/arm/full-codegen-arm.cc",
1041 "src/arm/interface-descriptors-arm.cc",
1042 "src/arm/interface-descriptors-arm.h",
1043 "src/arm/lithium-arm.cc",
1044 "src/arm/lithium-arm.h",
1045 "src/arm/lithium-codegen-arm.cc",
1046 "src/arm/lithium-codegen-arm.h",
1047 "src/arm/lithium-gap-resolver-arm.cc",
1048 "src/arm/lithium-gap-resolver-arm.h",
1049 "src/arm/macro-assembler-arm.cc",
1050 "src/arm/macro-assembler-arm.h",
1051 "src/arm/regexp-macro-assembler-arm.cc",
1052 "src/arm/regexp-macro-assembler-arm.h",
1053 "src/arm/simulator-arm.cc",
1054 "src/compiler/arm/code-generator-arm.cc",
1055 "src/compiler/arm/instruction-codes-arm.h",
1056 "src/compiler/arm/instruction-selector-arm.cc",
1057 "src/compiler/arm/linkage-arm.cc",
1058 "src/ic/arm/access-compiler-arm.cc",
1059 "src/ic/arm/handler-compiler-arm.cc",
1060 "src/ic/arm/ic-arm.cc",
1061 "src/ic/arm/ic-compiler-arm.cc",
1062 "src/ic/arm/stub-cache-arm.cc",
1064 } else if (v8_target_arch == "arm64") {
1066 "src/arm64/assembler-arm64.cc",
1067 "src/arm64/assembler-arm64.h",
1068 "src/arm64/assembler-arm64-inl.h",
1069 "src/arm64/builtins-arm64.cc",
1070 "src/arm64/codegen-arm64.cc",
1071 "src/arm64/codegen-arm64.h",
1072 "src/arm64/code-stubs-arm64.cc",
1073 "src/arm64/code-stubs-arm64.h",
1074 "src/arm64/constants-arm64.h",
1075 "src/arm64/cpu-arm64.cc",
1076 "src/arm64/debug-arm64.cc",
1077 "src/arm64/decoder-arm64.cc",
1078 "src/arm64/decoder-arm64.h",
1079 "src/arm64/decoder-arm64-inl.h",
1080 "src/arm64/deoptimizer-arm64.cc",
1081 "src/arm64/disasm-arm64.cc",
1082 "src/arm64/disasm-arm64.h",
1083 "src/arm64/frames-arm64.cc",
1084 "src/arm64/frames-arm64.h",
1085 "src/arm64/full-codegen-arm64.cc",
1086 "src/arm64/instructions-arm64.cc",
1087 "src/arm64/instructions-arm64.h",
1088 "src/arm64/instrument-arm64.cc",
1089 "src/arm64/instrument-arm64.h",
1090 "src/arm64/interface-descriptors-arm64.cc",
1091 "src/arm64/interface-descriptors-arm64.h",
1092 "src/arm64/lithium-arm64.cc",
1093 "src/arm64/lithium-arm64.h",
1094 "src/arm64/lithium-codegen-arm64.cc",
1095 "src/arm64/lithium-codegen-arm64.h",
1096 "src/arm64/lithium-gap-resolver-arm64.cc",
1097 "src/arm64/lithium-gap-resolver-arm64.h",
1098 "src/arm64/macro-assembler-arm64.cc",
1099 "src/arm64/macro-assembler-arm64.h",
1100 "src/arm64/macro-assembler-arm64-inl.h",
1101 "src/arm64/regexp-macro-assembler-arm64.cc",
1102 "src/arm64/regexp-macro-assembler-arm64.h",
1103 "src/arm64/simulator-arm64.cc",
1104 "src/arm64/simulator-arm64.h",
1105 "src/arm64/utils-arm64.cc",
1106 "src/arm64/utils-arm64.h",
1107 "src/compiler/arm64/code-generator-arm64.cc",
1108 "src/compiler/arm64/instruction-codes-arm64.h",
1109 "src/compiler/arm64/instruction-selector-arm64.cc",
1110 "src/compiler/arm64/linkage-arm64.cc",
1111 "src/ic/arm64/access-compiler-arm64.cc",
1112 "src/ic/arm64/handler-compiler-arm64.cc",
1113 "src/ic/arm64/ic-arm64.cc",
1114 "src/ic/arm64/ic-compiler-arm64.cc",
1115 "src/ic/arm64/stub-cache-arm64.cc",
1117 } else if (v8_target_arch == "mipsel") {
1119 "src/mips/assembler-mips.cc",
1120 "src/mips/assembler-mips.h",
1121 "src/mips/assembler-mips-inl.h",
1122 "src/mips/builtins-mips.cc",
1123 "src/mips/codegen-mips.cc",
1124 "src/mips/codegen-mips.h",
1125 "src/mips/code-stubs-mips.cc",
1126 "src/mips/code-stubs-mips.h",
1127 "src/mips/constants-mips.cc",
1128 "src/mips/constants-mips.h",
1129 "src/mips/cpu-mips.cc",
1130 "src/mips/debug-mips.cc",
1131 "src/mips/deoptimizer-mips.cc",
1132 "src/mips/disasm-mips.cc",
1133 "src/mips/frames-mips.cc",
1134 "src/mips/frames-mips.h",
1135 "src/mips/full-codegen-mips.cc",
1136 "src/mips/interface-descriptors-mips.cc",
1137 "src/mips/lithium-codegen-mips.cc",
1138 "src/mips/lithium-codegen-mips.h",
1139 "src/mips/lithium-gap-resolver-mips.cc",
1140 "src/mips/lithium-gap-resolver-mips.h",
1141 "src/mips/lithium-mips.cc",
1142 "src/mips/lithium-mips.h",
1143 "src/mips/macro-assembler-mips.cc",
1144 "src/mips/macro-assembler-mips.h",
1145 "src/mips/regexp-macro-assembler-mips.cc",
1146 "src/mips/regexp-macro-assembler-mips.h",
1147 "src/mips/simulator-mips.cc",
1148 "src/compiler/mips/code-generator-mips.cc",
1149 "src/compiler/mips/instruction-codes-mips.h",
1150 "src/compiler/mips/instruction-selector-mips.cc",
1151 "src/compiler/mips/linkage-mips.cc",
1152 "src/ic/mips/access-compiler-mips.cc",
1153 "src/ic/mips/handler-compiler-mips.cc",
1154 "src/ic/mips/ic-mips.cc",
1155 "src/ic/mips/ic-compiler-mips.cc",
1156 "src/ic/mips/stub-cache-mips.cc",
1158 } else if (v8_target_arch == "mips64el") {
1160 "src/mips64/assembler-mips64.cc",
1161 "src/mips64/assembler-mips64.h",
1162 "src/mips64/assembler-mips64-inl.h",
1163 "src/mips64/builtins-mips64.cc",
1164 "src/mips64/codegen-mips64.cc",
1165 "src/mips64/codegen-mips64.h",
1166 "src/mips64/code-stubs-mips64.cc",
1167 "src/mips64/code-stubs-mips64.h",
1168 "src/mips64/constants-mips64.cc",
1169 "src/mips64/constants-mips64.h",
1170 "src/mips64/cpu-mips64.cc",
1171 "src/mips64/debug-mips64.cc",
1172 "src/mips64/deoptimizer-mips64.cc",
1173 "src/mips64/disasm-mips64.cc",
1174 "src/mips64/frames-mips64.cc",
1175 "src/mips64/frames-mips64.h",
1176 "src/mips64/full-codegen-mips64.cc",
1177 "src/mips64/interface-descriptors-mips64.cc",
1178 "src/mips64/lithium-codegen-mips64.cc",
1179 "src/mips64/lithium-codegen-mips64.h",
1180 "src/mips64/lithium-gap-resolver-mips64.cc",
1181 "src/mips64/lithium-gap-resolver-mips64.h",
1182 "src/mips64/lithium-mips64.cc",
1183 "src/mips64/lithium-mips64.h",
1184 "src/mips64/macro-assembler-mips64.cc",
1185 "src/mips64/macro-assembler-mips64.h",
1186 "src/mips64/regexp-macro-assembler-mips64.cc",
1187 "src/mips64/regexp-macro-assembler-mips64.h",
1188 "src/mips64/simulator-mips64.cc",
1189 "src/ic/mips64/access-compiler-mips64.cc",
1190 "src/ic/mips64/handler-compiler-mips64.cc",
1191 "src/ic/mips64/ic-mips64.cc",
1192 "src/ic/mips64/ic-compiler-mips64.cc",
1193 "src/ic/mips64/stub-cache-mips64.cc",
1197 configs -= [ "//build/config/compiler:chromium_code" ]
1198 configs += [ "//build/config/compiler:no_chromium_code" ]
1199 configs += [ ":internal_config", ":features", ":toolchain" ]
1202 configs -= [ "//build/config/compiler:optimize" ]
1203 configs += [ "//build/config/compiler:optimize_max" ]
1207 deps = [ ":v8_libbase" ]
1210 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1211 cflags = [ "/wd4267" ]
1214 if (v8_compress_startup_data == "bz2") {
1219 if (v8_enable_i18n_support) {
1220 deps += [ "//third_party/icu" ]
1222 deps += [ "//third_party/icu:icudata" ]
1224 # TODO(jochen): Add support for icu_use_data_file_flag
1225 defines += [ "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE" ]
1233 if (v8_postmortem_support) {
1234 sources += [ "$target_gen_dir/debug-support.cc" ]
1235 deps += [ ":postmortem-metadata" ]
1239 source_set("v8_libbase") {
1240 visibility = [ ":*" ] # Only targets in this file can depend on this.
1243 "src/base/atomicops.h",
1244 "src/base/atomicops_internals_arm64_gcc.h",
1245 "src/base/atomicops_internals_arm_gcc.h",
1246 "src/base/atomicops_internals_atomicword_compat.h",
1247 "src/base/atomicops_internals_mac.h",
1248 "src/base/atomicops_internals_mips_gcc.h",
1249 "src/base/atomicops_internals_tsan.h",
1250 "src/base/atomicops_internals_x86_gcc.cc",
1251 "src/base/atomicops_internals_x86_gcc.h",
1252 "src/base/atomicops_internals_x86_msvc.h",
1255 "src/base/build_config.h",
1258 "src/base/division-by-constant.cc",
1259 "src/base/division-by-constant.h",
1261 "src/base/functional.cc",
1262 "src/base/functional.h",
1263 "src/base/lazy-instance.h",
1264 "src/base/logging.cc",
1265 "src/base/logging.h",
1266 "src/base/macros.h",
1269 "src/base/platform/elapsed-timer.h",
1270 "src/base/platform/time.cc",
1271 "src/base/platform/time.h",
1272 "src/base/platform/condition-variable.cc",
1273 "src/base/platform/condition-variable.h",
1274 "src/base/platform/mutex.cc",
1275 "src/base/platform/mutex.h",
1276 "src/base/platform/platform.h",
1277 "src/base/platform/semaphore.cc",
1278 "src/base/platform/semaphore.h",
1279 "src/base/safe_conversions.h",
1280 "src/base/safe_conversions_impl.h",
1281 "src/base/safe_math.h",
1282 "src/base/safe_math_impl.h",
1283 "src/base/sys-info.cc",
1284 "src/base/sys-info.h",
1285 "src/base/utils/random-number-generator.cc",
1286 "src/base/utils/random-number-generator.h",
1289 configs -= [ "//build/config/compiler:chromium_code" ]
1290 configs += [ "//build/config/compiler:no_chromium_code" ]
1291 configs += [ ":internal_config_base", ":features", ":toolchain" ]
1294 configs -= [ "//build/config/compiler:optimize" ]
1295 configs += [ "//build/config/compiler:optimize_max" ]
1302 "src/base/platform/platform-posix.cc"
1308 "src/base/platform/platform-linux.cc"
1312 } else if (is_android) {
1313 defines += [ "CAN_USE_VFP_INSTRUCTIONS" ]
1315 if (build_os == "mac") {
1316 if (current_toolchain == host_toolchain) {
1317 sources += [ "src/base/platform/platform-macos.cc" ]
1319 sources += [ "src/base/platform/platform-linux.cc" ]
1322 sources += [ "src/base/platform/platform-linux.cc" ]
1323 if (current_toolchain == host_toolchain) {
1324 defines += [ "V8_LIBRT_NOT_AVAILABLE" ]
1327 } else if (is_mac) {
1328 sources += [ "src/base/platform/platform-macos.cc" ]
1329 } else if (is_win) {
1330 # TODO(jochen): Add support for cygwin.
1332 "src/base/platform/platform-win32.cc",
1333 "src/base/win32-headers.h",
1336 defines += [ "_CRT_RAND_S" ] # for rand_s()
1338 libs = [ "winmm.lib", "ws2_32.lib" ]
1341 # TODO(jochen): Add support for qnx, freebsd, openbsd, netbsd, and solaris.
1344 source_set("v8_libplatform") {
1346 "include/libplatform/libplatform.h",
1347 "src/libplatform/default-platform.cc",
1348 "src/libplatform/default-platform.h",
1349 "src/libplatform/task-queue.cc",
1350 "src/libplatform/task-queue.h",
1351 "src/libplatform/worker-thread.cc",
1352 "src/libplatform/worker-thread.h",
1355 configs -= [ "//build/config/compiler:chromium_code" ]
1356 configs += [ "//build/config/compiler:no_chromium_code" ]
1357 configs += [ ":internal_config_base", ":features", ":toolchain" ]
1360 configs -= [ "//build/config/compiler:optimize" ]
1361 configs += [ "//build/config/compiler:optimize_max" ]
1369 ###############################################################################
1373 if (current_toolchain == host_toolchain) {
1374 executable("mksnapshot") {
1375 visibility = [ ":*" ] # Only targets in this file can depend on this.
1378 "src/mksnapshot.cc",
1381 configs -= [ "//build/config/compiler:chromium_code" ]
1382 configs += [ "//build/config/compiler:no_chromium_code" ]
1383 configs += [ ":internal_config", ":features", ":toolchain" ]
1389 "//build/config/sanitizers:deps",
1392 if (v8_compress_startup_data == "bz2") {
1398 ###############################################################################
1402 if (component_mode == "shared_library") {
1406 "src/v8dll-main.cc",
1409 if (v8_use_external_startup_data) {
1412 ":v8_external_snapshot",
1414 } else if (v8_use_snapshot) {
1426 configs -= [ "//build/config/compiler:chromium_code" ]
1427 configs += [ "//build/config/compiler:no_chromium_code" ]
1428 configs += [ ":internal_config", ":features", ":toolchain" ]
1430 direct_dependent_configs = [ ":external_config" ]
1433 if (is_android && current_toolchain != host_toolchain) {
1441 if (v8_use_external_startup_data) {
1444 ":v8_external_snapshot",
1446 } else if (v8_use_snapshot) {
1458 direct_dependent_configs = [ ":external_config" ]