OLD | NEW |
1 # Copyright 2013 the V8 project authors. All rights reserved. | 1 # Copyright 2013 the V8 project authors. All rights reserved. |
2 # Redistribution and use in source and binary forms, with or without | 2 # Redistribution and use in source and binary forms, with or without |
3 # modification, are permitted provided that the following conditions are | 3 # modification, are permitted provided that the following conditions are |
4 # met: | 4 # met: |
5 # | 5 # |
6 # * Redistributions of source code must retain the above copyright | 6 # * Redistributions of source code must retain the above copyright |
7 # notice, this list of conditions and the following disclaimer. | 7 # notice, this list of conditions and the following disclaimer. |
8 # * Redistributions in binary form must reproduce the above | 8 # * Redistributions in binary form must reproduce the above |
9 # copyright notice, this list of conditions and the following | 9 # copyright notice, this list of conditions and the following |
10 # disclaimer in the documentation and/or other materials provided | 10 # disclaimer in the documentation and/or other materials provided |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 'v8_can_use_fpu_instructions%': 'true', | 53 'v8_can_use_fpu_instructions%': 'true', |
54 | 54 |
55 # Similar to the ARM hard float ABI but on MIPS. | 55 # Similar to the ARM hard float ABI but on MIPS. |
56 'v8_use_mips_abi_hardfloat%': 'true', | 56 'v8_use_mips_abi_hardfloat%': 'true', |
57 | 57 |
58 # Default arch variant for MIPS. | 58 # Default arch variant for MIPS. |
59 'mips_arch_variant%': 'mips32r2', | 59 'mips_arch_variant%': 'mips32r2', |
60 | 60 |
61 'v8_enable_backtrace%': 0, | 61 'v8_enable_backtrace%': 0, |
62 | 62 |
63 # Turns on compiler optimizations in Debug builds (#defines are unaffected). | 63 # Speeds up Debug builds: |
| 64 # 0 - Compiler optimizations off (debuggable) (default). This may |
| 65 # be 5x slower than Release (or worse). |
| 66 # 1 - Turn on compiler optimizations. This may be hard or impossible to |
| 67 # debug. This may still be 2x slower than Release (or worse). |
| 68 # 2 - Turn on optimizations, and also #undef DEBUG / #define NDEBUG |
| 69 # (but leave V8_ENABLE_CHECKS and most other assertions enabled. |
| 70 # This may cause some v8 tests to fail in the Debug configuration. |
| 71 # This roughly matches the performance of a Release build and can |
| 72 # be used by embedders that need to build their own code as debug |
| 73 # but don't want or need a debug version of V8. This should produce |
| 74 # near-release speeds. |
64 'v8_optimized_debug%': 0, | 75 'v8_optimized_debug%': 0, |
65 | 76 |
66 # Enable profiling support. Only required on Windows. | 77 # Enable profiling support. Only required on Windows. |
67 'v8_enable_prof%': 0, | 78 'v8_enable_prof%': 0, |
68 | 79 |
69 # Some versions of GCC 4.5 seem to need -fno-strict-aliasing. | 80 # Some versions of GCC 4.5 seem to need -fno-strict-aliasing. |
70 'v8_no_strict_aliasing%': 0, | 81 'v8_no_strict_aliasing%': 0, |
71 | 82 |
72 # Chrome needs this definition unconditionally. For standalone V8 builds, | 83 # Chrome needs this definition unconditionally. For standalone V8 builds, |
73 # it's handled in build/standalone.gypi. | 84 # it's handled in build/standalone.gypi. |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 ['OS=="freebsd" or OS=="openbsd"', { | 445 ['OS=="freebsd" or OS=="openbsd"', { |
435 'cflags': [ '-I/usr/local/include' ], | 446 'cflags': [ '-I/usr/local/include' ], |
436 }], | 447 }], |
437 ['OS=="netbsd"', { | 448 ['OS=="netbsd"', { |
438 'cflags': [ '-I/usr/pkg/include' ], | 449 'cflags': [ '-I/usr/pkg/include' ], |
439 }], | 450 }], |
440 ], # conditions | 451 ], # conditions |
441 'configurations': { | 452 'configurations': { |
442 'Debug': { | 453 'Debug': { |
443 'defines': [ | 454 'defines': [ |
444 'DEBUG', | |
445 'ENABLE_DISASSEMBLER', | 455 'ENABLE_DISASSEMBLER', |
446 'V8_ENABLE_CHECKS', | 456 'V8_ENABLE_CHECKS', |
447 'OBJECT_PRINT', | 457 'OBJECT_PRINT', |
448 'VERIFY_HEAP', | 458 'VERIFY_HEAP', |
449 ], | 459 ], |
450 'msvs_settings': { | 460 'msvs_settings': { |
451 'VCCLCompilerTool': { | 461 'VCCLCompilerTool': { |
452 'conditions': [ | 462 'conditions': [ |
453 ['component=="shared_library"', { | 463 ['v8_optimized_debug==0', { |
454 'RuntimeLibrary': '3', # /MDd | 464 'Optimization': '0', |
455 }, { | 465 'conditions': [ |
456 'RuntimeLibrary': '1', # /MTd | 466 ['component=="shared_library"', { |
| 467 'RuntimeLibrary': '3', # /MDd |
| 468 }, { |
| 469 'RuntimeLibrary': '1', # /MTd |
| 470 }], |
| 471 ], |
457 }], | 472 }], |
458 ['v8_optimized_debug==1', { | 473 ['v8_optimized_debug==1', { |
459 'Optimization': '1', | 474 'Optimization': '1', |
460 'InlineFunctionExpansion': '2', | 475 'InlineFunctionExpansion': '2', |
461 'EnableIntrinsicFunctions': 'true', | 476 'EnableIntrinsicFunctions': 'true', |
462 'FavorSizeOrSpeed': '0', | 477 'FavorSizeOrSpeed': '0', |
463 'StringPooling': 'true', | 478 'StringPooling': 'true', |
464 'BasicRuntimeChecks': '0', | 479 'BasicRuntimeChecks': '0', |
465 }, { | 480 'conditions': [ |
466 'Optimization': '0', | 481 ['component=="shared_library"', { |
| 482 'RuntimeLibrary': '3', # /MDd |
| 483 }, { |
| 484 'RuntimeLibrary': '1', # /MTd |
| 485 }], |
| 486 ], |
| 487 }], |
| 488 ['v8_optimized_debug==2', { |
| 489 'Optimization': '2', |
| 490 'InlineFunctionExpansion': '2', |
| 491 'EnableIntrinsicFunctions': 'true', |
| 492 'FavorSizeOrSpeed': '0', |
| 493 'StringPooling': 'true', |
| 494 'BasicRuntimeChecks': '0', |
| 495 'conditions': [ |
| 496 ['component=="shared_library"', { |
| 497 'RuntimeLibrary': '2', #/MD |
| 498 }, { |
| 499 'RuntimeLibrary': '0', #/MT |
| 500 }], |
| 501 ['v8_target_arch=="x64"', { |
| 502 # TODO(2207): remove this option once the bug is fixed. |
| 503 'WholeProgramOptimization': 'true', |
| 504 }], |
| 505 ], |
467 }], | 506 }], |
468 ], | 507 ], |
469 }, | 508 }, |
470 'VCLinkerTool': { | 509 'VCLinkerTool': { |
471 'LinkIncremental': '2', | 510 'conditions': [ |
| 511 ['v8_optimized_debug==0', { |
| 512 'LinkIncremental': '2', |
| 513 }], |
| 514 ['v8_optimized_debug==1', { |
| 515 'LinkIncremental': '2', |
| 516 }], |
| 517 ['v8_optimized_debug==2', { |
| 518 'LinkIncremental': '1', |
| 519 'OptimizeReferences': '2', |
| 520 'EnableCOMDATFolding': '2', |
| 521 }], |
| 522 ], |
472 }, | 523 }, |
473 }, | 524 }, |
474 'conditions': [ | 525 'conditions': [ |
| 526 ['v8_optimized_debug==2', { |
| 527 'defines': [ |
| 528 'NDEBUG', |
| 529 ], |
| 530 }, { |
| 531 'defines': [ |
| 532 'DEBUG', |
| 533 ], |
| 534 }], |
475 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', { | 535 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', { |
476 'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter', | 536 'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter', |
477 '-Wnon-virtual-dtor', '-Woverloaded-virtual', | 537 '-Wnon-virtual-dtor', '-Woverloaded-virtual', |
478 '<(wno_array_bounds)', | 538 '<(wno_array_bounds)', |
479 # Hide some GCC 4.8 warnings: | 539 # Hide some GCC 4.8 warnings: |
480 # TODO(jbramley): Only enable these on GCC 4.8. | 540 # TODO(jbramley): Only enable these on GCC 4.8. |
481 '-Wno-unused-local-typedefs', | 541 '-Wno-unused-local-typedefs', |
482 '-Wno-maybe-uninitialized' ], | 542 '-Wno-maybe-uninitialized' ], |
483 'conditions': [ | 543 'conditions': [ |
| 544 ['v8_optimized_debug==0', { |
| 545 'cflags!': [ |
| 546 '-O0', |
| 547 '-O3', |
| 548 '-O2', |
| 549 '-O1', |
| 550 '-Os', |
| 551 ], |
| 552 'cflags': [ |
| 553 '-fdata-sections', |
| 554 '-ffunction-sections', |
| 555 ], |
| 556 }], |
484 ['v8_optimized_debug==1', { | 557 ['v8_optimized_debug==1', { |
485 'cflags!': [ | 558 'cflags!': [ |
486 '-O0', | 559 '-O0', |
| 560 '-O3', # TODO(2807) should be -O1. |
487 '-O2', | 561 '-O2', |
488 '-Os', | 562 '-Os', |
489 ], | 563 ], |
490 'cflags': [ | 564 'cflags': [ |
491 '-fdata-sections', | 565 '-fdata-sections', |
492 '-ffunction-sections', | 566 '-ffunction-sections', |
493 '-O1', | 567 '-O1', # TODO(2807) should be -O3. |
494 ], | 568 ], |
495 }], | 569 }], |
496 ['v8_optimized_debug==1 and gcc_version==44 and clang==0', { | 570 ['v8_optimized_debug==2', { |
| 571 'cflags!': [ |
| 572 '-O0', |
| 573 '-O1', |
| 574 '-O2', |
| 575 '-Os', |
| 576 ], |
| 577 'cflags': [ |
| 578 '-fdata-sections', |
| 579 '-ffunction-sections', |
| 580 '-O3', |
| 581 ], |
| 582 }], |
| 583 ['v8_optimized_debug!=0 and gcc_version==44 and clang==0', { |
497 'cflags': [ | 584 'cflags': [ |
498 # Avoid crashes with gcc 4.4 in the v8 test suite. | 585 # Avoid crashes with gcc 4.4 in the v8 test suite. |
499 '-fno-tree-vrp', | 586 '-fno-tree-vrp', |
500 ], | 587 ], |
501 }], | 588 }], |
502 ], | 589 ], |
503 }], | 590 }], |
504 ['OS=="linux" and v8_enable_backtrace==1', { | 591 ['OS=="linux" and v8_enable_backtrace==1', { |
505 # Support for backtrace_symbols. | 592 # Support for backtrace_symbols. |
506 'ldflags': [ '-rdynamic' ], | 593 'ldflags': [ '-rdynamic' ], |
507 }], | 594 }], |
508 ['OS=="android"', { | 595 ['OS=="android"', { |
509 'variables': { | 596 'variables': { |
510 'android_full_debug%': 1, | 597 'android_full_debug%': 1, |
511 }, | 598 }, |
512 'conditions': [ | 599 'conditions': [ |
513 ['android_full_debug==0', { | 600 ['android_full_debug==0', { |
514 # Disable full debug if we want a faster v8 in a debug build. | 601 # Disable full debug if we want a faster v8 in a debug build. |
515 # TODO(2304): pass DISABLE_DEBUG_ASSERT instead of hiding DEBUG. | 602 # TODO(2304): pass DISABLE_DEBUG_ASSERT instead of hiding DEBUG. |
516 'defines!': [ | 603 'defines!': [ |
517 'DEBUG', | 604 'DEBUG', |
518 ], | 605 ], |
519 }], | 606 }], |
520 ], | 607 ], |
521 }], | 608 }], |
522 ['OS=="mac"', { | 609 ['OS=="mac"', { |
523 'xcode_settings': { | 610 'xcode_settings': { |
524 'conditions': [ | 611 'conditions': [ |
525 ['v8_optimized_debug==1', { | 612 ['v8_optimized_debug==0', { |
526 'GCC_OPTIMIZATION_LEVEL': '1', # -O1 | 613 'GCC_OPTIMIZATION_LEVEL': '0', # -O0 |
| 614 }, { |
| 615 'GCC_OPTIMIZATION_LEVEL': '3', # -O3 |
527 'GCC_STRICT_ALIASING': 'YES', | 616 'GCC_STRICT_ALIASING': 'YES', |
528 }, { | |
529 'GCC_OPTIMIZATION_LEVEL': '0', # -O0 | |
530 }], | 617 }], |
531 ], | 618 ], |
532 }, | 619 }, |
533 }], | 620 }], |
534 ], | 621 ], |
535 }, # Debug | 622 }, # Debug |
536 'Release': { | 623 'Release': { |
537 'conditions': [ | 624 'conditions': [ |
538 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', { | 625 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', { |
539 'cflags!': [ | 626 'cflags!': [ |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
614 'OptimizeReferences': '2', | 701 'OptimizeReferences': '2', |
615 'EnableCOMDATFolding': '2', | 702 'EnableCOMDATFolding': '2', |
616 }, | 703 }, |
617 }, | 704 }, |
618 }], # OS=="win" | 705 }], # OS=="win" |
619 ], # conditions | 706 ], # conditions |
620 }, # Release | 707 }, # Release |
621 }, # configurations | 708 }, # configurations |
622 }, # target_defaults | 709 }, # target_defaults |
623 } | 710 } |
OLD | NEW |