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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 ], | 438 ], |
439 }], | 439 }], |
440 ['OS=="freebsd" or OS=="openbsd"', { | 440 ['OS=="freebsd" or OS=="openbsd"', { |
441 'cflags': [ '-I/usr/local/include' ], | 441 'cflags': [ '-I/usr/local/include' ], |
442 }], | 442 }], |
443 ['OS=="netbsd"', { | 443 ['OS=="netbsd"', { |
444 'cflags': [ '-I/usr/pkg/include' ], | 444 'cflags': [ '-I/usr/pkg/include' ], |
445 }], | 445 }], |
446 ], # conditions | 446 ], # conditions |
447 'configurations': { | 447 'configurations': { |
448 'Debug': { | 448 # Abstract configuration for v8_optimized_debug == 0. |
449 'defines': [ | 449 'DebugBase0': { |
450 'ENABLE_DISASSEMBLER', | 450 'abstract': 1, |
451 'V8_ENABLE_CHECKS', | |
452 'OBJECT_PRINT', | |
453 'VERIFY_HEAP', | |
454 'DEBUG' | |
455 ], | |
456 'msvs_settings': { | 451 'msvs_settings': { |
457 'VCCLCompilerTool': { | 452 'VCCLCompilerTool': { |
| 453 'Optimization': '0', |
458 'conditions': [ | 454 'conditions': [ |
459 ['v8_optimized_debug==0', { | 455 ['component=="shared_library"', { |
460 'Optimization': '0', | 456 'RuntimeLibrary': '3', # /MDd |
461 'conditions': [ | 457 }, { |
462 ['component=="shared_library"', { | 458 'RuntimeLibrary': '1', # /MTd |
463 'RuntimeLibrary': '3', # /MDd | |
464 }, { | |
465 'RuntimeLibrary': '1', # /MTd | |
466 }], | |
467 ], | |
468 }], | |
469 ['v8_optimized_debug==1', { | |
470 'Optimization': '1', | |
471 'InlineFunctionExpansion': '2', | |
472 'EnableIntrinsicFunctions': 'true', | |
473 'FavorSizeOrSpeed': '0', | |
474 'StringPooling': 'true', | |
475 'BasicRuntimeChecks': '0', | |
476 'conditions': [ | |
477 ['component=="shared_library"', { | |
478 'RuntimeLibrary': '3', # /MDd | |
479 }, { | |
480 'RuntimeLibrary': '1', # /MTd | |
481 }], | |
482 ], | |
483 }], | |
484 ['v8_optimized_debug==2', { | |
485 'Optimization': '2', | |
486 'InlineFunctionExpansion': '2', | |
487 'EnableIntrinsicFunctions': 'true', | |
488 'FavorSizeOrSpeed': '0', | |
489 'StringPooling': 'true', | |
490 'BasicRuntimeChecks': '0', | |
491 'conditions': [ | |
492 ['component=="shared_library"', { | |
493 'RuntimeLibrary': '3', #/MDd | |
494 }, { | |
495 'RuntimeLibrary': '1', #/MTd | |
496 }], | |
497 ['v8_target_arch=="x64"', { | |
498 # TODO(2207): remove this option once the bug is fixed. | |
499 'WholeProgramOptimization': 'true', | |
500 }], | |
501 ], | |
502 }], | 459 }], |
503 ], | 460 ], |
504 }, | 461 }, |
505 'VCLinkerTool': { | 462 'VCLinkerTool': { |
506 'conditions': [ | 463 'LinkIncremental': '2', |
507 ['v8_optimized_debug==0', { | |
508 'LinkIncremental': '2', | |
509 }], | |
510 ['v8_optimized_debug==1', { | |
511 'LinkIncremental': '2', | |
512 }], | |
513 ['v8_optimized_debug==2', { | |
514 'LinkIncremental': '1', | |
515 'OptimizeReferences': '2', | |
516 'EnableCOMDATFolding': '2', | |
517 }], | |
518 ], | |
519 }, | 464 }, |
520 }, | 465 }, |
521 'conditions': [ | 466 'conditions': [ |
522 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \ | 467 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \ |
523 OS=="qnx"', { | 468 OS=="qnx"', { |
524 'cflags': [ '-Woverloaded-virtual', '<(wno_array_bounds)', ], | 469 'cflags!': [ |
| 470 '-O0', |
| 471 '-O3', |
| 472 '-O2', |
| 473 '-O1', |
| 474 '-Os', |
| 475 ], |
| 476 'cflags': [ |
| 477 '-fdata-sections', |
| 478 '-ffunction-sections', |
| 479 ], |
| 480 }], |
| 481 ['OS=="mac"', { |
| 482 'xcode_settings': { |
| 483 'GCC_OPTIMIZATION_LEVEL': '0', # -O0 |
| 484 }, |
| 485 }], |
| 486 ], |
| 487 }, # DebugBase0 |
| 488 # Abstract configuration for v8_optimized_debug == 1. |
| 489 'DebugBase1': { |
| 490 'abstract': 1, |
| 491 'msvs_settings': { |
| 492 'VCCLCompilerTool': { |
| 493 'Optimization': '1', |
| 494 'InlineFunctionExpansion': '2', |
| 495 'EnableIntrinsicFunctions': 'true', |
| 496 'FavorSizeOrSpeed': '0', |
| 497 'StringPooling': 'true', |
| 498 'BasicRuntimeChecks': '0', |
525 'conditions': [ | 499 'conditions': [ |
526 ['v8_optimized_debug==0', { | 500 ['component=="shared_library"', { |
527 'cflags!': [ | 501 'RuntimeLibrary': '3', # /MDd |
528 '-O0', | 502 }, { |
529 '-O3', | 503 'RuntimeLibrary': '1', # /MTd |
530 '-O2', | |
531 '-O1', | |
532 '-Os', | |
533 ], | |
534 'cflags': [ | |
535 '-fdata-sections', | |
536 '-ffunction-sections', | |
537 ], | |
538 }], | 504 }], |
539 ['v8_optimized_debug==1', { | 505 ], |
540 'cflags!': [ | 506 }, |
541 '-O0', | 507 'VCLinkerTool': { |
542 '-O3', # TODO(2807) should be -O1. | 508 'LinkIncremental': '2', |
543 '-O2', | 509 }, |
544 '-Os', | 510 }, |
545 ], | 511 'conditions': [ |
546 'cflags': [ | 512 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \ |
547 '-fdata-sections', | 513 OS=="qnx"', { |
548 '-ffunction-sections', | 514 'cflags!': [ |
549 '-O1', # TODO(2807) should be -O3. | 515 '-O0', |
550 ], | 516 '-O3', # TODO(2807) should be -O1. |
551 }], | 517 '-O2', |
552 ['v8_optimized_debug==2', { | 518 '-Os', |
553 'cflags!': [ | 519 ], |
554 '-O0', | 520 'cflags': [ |
555 '-O1', | 521 '-fdata-sections', |
556 '-Os', | 522 '-ffunction-sections', |
557 ], | 523 '-O1', # TODO(2807) should be -O3. |
558 'cflags': [ | 524 ], |
559 '-fdata-sections', | 525 'conditions': [ |
560 '-ffunction-sections', | 526 ['gcc_version==44 and clang==0', { |
561 ], | |
562 'defines': [ | |
563 'OPTIMIZED_DEBUG' | |
564 ], | |
565 'conditions': [ | |
566 # TODO(crbug.com/272548): Avoid -O3 in NaCl | |
567 ['nacl_target_arch=="none"', { | |
568 'cflags': ['-O3'], | |
569 'cflags!': ['-O2'], | |
570 }, { | |
571 'cflags': ['-O2'], | |
572 'cflags!': ['-O3'], | |
573 }], | |
574 ], | |
575 }], | |
576 ['v8_optimized_debug!=0 and gcc_version==44 and clang==0', { | |
577 'cflags': [ | 527 'cflags': [ |
578 # Avoid crashes with gcc 4.4 in the v8 test suite. | 528 # Avoid crashes with gcc 4.4 in the v8 test suite. |
579 '-fno-tree-vrp', | 529 '-fno-tree-vrp', |
| 530 ], |
| 531 }], |
| 532 ], |
| 533 }], |
| 534 ['OS=="mac"', { |
| 535 'xcode_settings': { |
| 536 'GCC_OPTIMIZATION_LEVEL': '3', # -O3 |
| 537 'GCC_STRICT_ALIASING': 'YES', |
| 538 }, |
| 539 }], |
| 540 ], |
| 541 }, # DebugBase1 |
| 542 # Abstract configuration for v8_optimized_debug == 2. |
| 543 'DebugBase2': { |
| 544 'abstract': 1, |
| 545 'msvs_settings': { |
| 546 'VCCLCompilerTool': { |
| 547 'Optimization': '2', |
| 548 'InlineFunctionExpansion': '2', |
| 549 'EnableIntrinsicFunctions': 'true', |
| 550 'FavorSizeOrSpeed': '0', |
| 551 'StringPooling': 'true', |
| 552 'BasicRuntimeChecks': '0', |
| 553 'conditions': [ |
| 554 ['component=="shared_library"', { |
| 555 'RuntimeLibrary': '3', #/MDd |
| 556 }, { |
| 557 'RuntimeLibrary': '1', #/MTd |
| 558 }], |
| 559 ['v8_target_arch=="x64"', { |
| 560 # TODO(2207): remove this option once the bug is fixed. |
| 561 'WholeProgramOptimization': 'true', |
| 562 }], |
| 563 ], |
| 564 }, |
| 565 'VCLinkerTool': { |
| 566 'LinkIncremental': '1', |
| 567 'OptimizeReferences': '2', |
| 568 'EnableCOMDATFolding': '2', |
| 569 }, |
| 570 }, |
| 571 'conditions': [ |
| 572 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \ |
| 573 OS=="qnx"', { |
| 574 'cflags!': [ |
| 575 '-O0', |
| 576 '-O1', |
| 577 '-Os', |
| 578 ], |
| 579 'cflags': [ |
| 580 '-fdata-sections', |
| 581 '-ffunction-sections', |
| 582 ], |
| 583 'defines': [ |
| 584 'OPTIMIZED_DEBUG' |
| 585 ], |
| 586 'conditions': [ |
| 587 # TODO(crbug.com/272548): Avoid -O3 in NaCl |
| 588 ['nacl_target_arch=="none"', { |
| 589 'cflags': ['-O3'], |
| 590 'cflags!': ['-O2'], |
| 591 }, { |
| 592 'cflags': ['-O2'], |
| 593 'cflags!': ['-O3'], |
| 594 }], |
| 595 ['gcc_version==44 and clang==0', { |
| 596 'cflags': [ |
| 597 # Avoid crashes with gcc 4.4 in the v8 test suite. |
| 598 '-fno-tree-vrp', |
580 ], | 599 ], |
581 }], | 600 }], |
582 ], | 601 ], |
583 }], | 602 }], |
| 603 ['OS=="mac"', { |
| 604 'xcode_settings': { |
| 605 'GCC_OPTIMIZATION_LEVEL': '3', # -O3 |
| 606 'GCC_STRICT_ALIASING': 'YES', |
| 607 }, |
| 608 }], |
| 609 ], |
| 610 }, # DebugBase2 |
| 611 # Common settings for the Debug configuration. |
| 612 'DebugBaseCommon': { |
| 613 'abstract': 1, |
| 614 'defines': [ |
| 615 'ENABLE_DISASSEMBLER', |
| 616 'V8_ENABLE_CHECKS', |
| 617 'OBJECT_PRINT', |
| 618 'VERIFY_HEAP', |
| 619 'DEBUG' |
| 620 ], |
| 621 'conditions': [ |
| 622 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \ |
| 623 OS=="qnx"', { |
| 624 'cflags': [ '-Woverloaded-virtual', '<(wno_array_bounds)', ], |
| 625 }], |
584 ['OS=="linux" and v8_enable_backtrace==1', { | 626 ['OS=="linux" and v8_enable_backtrace==1', { |
585 # Support for backtrace_symbols. | 627 # Support for backtrace_symbols. |
586 'ldflags': [ '-rdynamic' ], | 628 'ldflags': [ '-rdynamic' ], |
587 }], | 629 }], |
588 ['OS=="android"', { | 630 ['OS=="android"', { |
589 'variables': { | 631 'variables': { |
590 'android_full_debug%': 1, | 632 'android_full_debug%': 1, |
591 }, | 633 }, |
592 'conditions': [ | 634 'conditions': [ |
593 ['android_full_debug==0', { | 635 ['android_full_debug==0', { |
594 # Disable full debug if we want a faster v8 in a debug build. | 636 # Disable full debug if we want a faster v8 in a debug build. |
595 # TODO(2304): pass DISABLE_DEBUG_ASSERT instead of hiding DEBUG. | 637 # TODO(2304): pass DISABLE_DEBUG_ASSERT instead of hiding DEBUG. |
596 'defines!': [ | 638 'defines!': [ |
597 'DEBUG', | 639 'DEBUG', |
598 ], | 640 ], |
599 }], | 641 }], |
600 ], | 642 ], |
601 }], | 643 }], |
602 ['OS=="mac"', { | 644 ], |
603 'xcode_settings': { | 645 }, # DebugBaseCommon |
604 'conditions': [ | 646 'Debug': { |
605 ['v8_optimized_debug==0', { | 647 'inherit_from': ['DebugBaseCommon'], |
606 'GCC_OPTIMIZATION_LEVEL': '0', # -O0 | 648 'conditions': [ |
607 }, { | 649 ['v8_optimized_debug==0', { |
608 'GCC_OPTIMIZATION_LEVEL': '3', # -O3 | 650 'inherit_from': ['DebugBase0'], |
609 'GCC_STRICT_ALIASING': 'YES', | 651 }], |
610 }], | 652 ['v8_optimized_debug==1', { |
611 ], | 653 'inherit_from': ['DebugBase1'], |
612 }, | 654 }], |
| 655 ['v8_optimized_debug==2', { |
| 656 'inherit_from': ['DebugBase2'], |
613 }], | 657 }], |
614 ], | 658 ], |
615 }, # Debug | 659 }, # Debug |
616 'Release': { | 660 'Release': { |
617 'conditions': [ | 661 'conditions': [ |
618 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', { | 662 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', { |
619 'cflags!': [ | 663 'cflags!': [ |
620 '-Os', | 664 '-Os', |
621 ], | 665 ], |
622 'cflags': [ | 666 'cflags': [ |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
696 'OptimizeReferences': '2', | 740 'OptimizeReferences': '2', |
697 'EnableCOMDATFolding': '2', | 741 'EnableCOMDATFolding': '2', |
698 }, | 742 }, |
699 }, | 743 }, |
700 }], # OS=="win" | 744 }], # OS=="win" |
701 ], # conditions | 745 ], # conditions |
702 }, # Release | 746 }, # Release |
703 }, # configurations | 747 }, # configurations |
704 }, # target_defaults | 748 }, # target_defaults |
705 } | 749 } |
OLD | NEW |