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