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 # Turns on compiler optimizations in Debug builds: |
64 # 0 - optimizations off (default) | |
65 # 1 - basic optimizations on | |
66 # 3 - match release mode optimizations | |
Michael Achenbach
2013/07/22 11:23:19
The issue description introduces mode=2, why is it
| |
64 'v8_optimized_debug%': 0, | 67 'v8_optimized_debug%': 0, |
68 | |
69 # #defines ENABLE_CHECK et al in Debug. On by default. | |
70 'v8_enable_checks_in_debug%': 1, | |
65 | 71 |
66 # Enable profiling support. Only required on Windows. | 72 # Enable profiling support. Only required on Windows. |
67 'v8_enable_prof%': 0, | 73 'v8_enable_prof%': 0, |
68 | 74 |
69 # Some versions of GCC 4.5 seem to need -fno-strict-aliasing. | 75 # Some versions of GCC 4.5 seem to need -fno-strict-aliasing. |
70 'v8_no_strict_aliasing%': 0, | 76 'v8_no_strict_aliasing%': 0, |
71 | 77 |
72 # Chrome needs this definition unconditionally. For standalone V8 builds, | 78 # Chrome needs this definition unconditionally. For standalone V8 builds, |
73 # it's handled in build/standalone.gypi. | 79 # it's handled in build/standalone.gypi. |
74 'want_separate_host_toolset%': 1, | 80 'want_separate_host_toolset%': 1, |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
427 }], | 433 }], |
428 ['OS=="freebsd" or OS=="openbsd"', { | 434 ['OS=="freebsd" or OS=="openbsd"', { |
429 'cflags': [ '-I/usr/local/include' ], | 435 'cflags': [ '-I/usr/local/include' ], |
430 }], | 436 }], |
431 ['OS=="netbsd"', { | 437 ['OS=="netbsd"', { |
432 'cflags': [ '-I/usr/pkg/include' ], | 438 'cflags': [ '-I/usr/pkg/include' ], |
433 }], | 439 }], |
434 ], # conditions | 440 ], # conditions |
435 'configurations': { | 441 'configurations': { |
436 'Debug': { | 442 'Debug': { |
437 'defines': [ | |
438 'DEBUG', | |
439 'ENABLE_DISASSEMBLER', | |
440 'V8_ENABLE_CHECKS', | |
441 'OBJECT_PRINT', | |
442 'VERIFY_HEAP', | |
443 ], | |
444 'msvs_settings': { | 443 'msvs_settings': { |
445 'VCCLCompilerTool': { | 444 'VCCLCompilerTool': { |
446 'conditions': [ | 445 'conditions': [ |
447 ['component=="shared_library"', { | 446 ['component=="shared_library"', { |
448 'RuntimeLibrary': '3', # /MDd | 447 'RuntimeLibrary': '3', # /MDd |
449 }, { | 448 }, { |
450 'RuntimeLibrary': '1', # /MTd | 449 'RuntimeLibrary': '1', # /MTd |
451 }], | 450 }], |
451 ['v8_optimized_debug==0', { | |
452 'Optimization': '0', | |
453 }], | |
452 ['v8_optimized_debug==1', { | 454 ['v8_optimized_debug==1', { |
453 'Optimization': '1', | 455 'Optimization': '1', |
454 'InlineFunctionExpansion': '2', | 456 'InlineFunctionExpansion': '2', |
455 'EnableIntrinsicFunctions': 'true', | 457 'EnableIntrinsicFunctions': 'true', |
456 'FavorSizeOrSpeed': '0', | 458 'FavorSizeOrSpeed': '0', |
457 'StringPooling': 'true', | 459 'StringPooling': 'true', |
458 'BasicRuntimeChecks': '0', | 460 'BasicRuntimeChecks': '0', |
459 }, { | 461 }], |
460 'Optimization': '0', | 462 ['v8_optimized_debug==3', { |
463 'Optimization': '2', | |
464 'InlineFunctionExpansion': '2', | |
465 'EnableIntrinsicFunctions': 'true', | |
466 'FavorSizeOrSpeed': '0', | |
467 'StringPooling': 'true', | |
468 'conditions': [ | |
469 ['component=="shared_library"', { | |
470 'RuntimeLibrary': '2', #/MD | |
471 }, { | |
472 'RuntimeLibrary': '0', #/MT | |
473 }], | |
474 ['v8_target_arch=="x64"', { | |
475 # TODO(2207): remove this option once the bug is fixed. | |
476 'WholeProgramOptimization': 'true', | |
477 }], | |
478 ], | |
461 }], | 479 }], |
462 ], | 480 ], |
463 }, | 481 }, |
464 'VCLinkerTool': { | 482 'VCLinkerTool': { |
465 'LinkIncremental': '2', | 483 'conditions': [ |
484 ['v8_optimized_debug==0', { | |
485 'LinkIncremental': '2', | |
486 }], | |
487 ['v8_optimized_debug==1', { | |
488 'LinkIncremental': '2', | |
489 }], | |
490 ['v8_optimized_debug==3', { | |
491 'LinkIncremental': '1', | |
492 'OptimizeReferences': '2', | |
493 'EnableCOMDATFolding': '2', | |
494 }], | |
495 ], | |
466 }, | 496 }, |
467 }, | 497 }, |
468 'conditions': [ | 498 'conditions': [ |
499 ['v8_enable_checks_in_debug==1', { | |
500 'defines': [ | |
501 'DEBUG', | |
502 'ENABLE_DISASSEMBLER', | |
503 'V8_ENABLE_CHECKS', | |
504 'OBJECT_PRINT', | |
505 'VERIFY_HEAP', | |
506 ], | |
507 }, { | |
508 'defines!': ['_DEBUG',], | |
Michael Achenbach
2013/07/22 11:23:19
Is the "_" intentional?
| |
509 'defines': ['NDEBUG'], | |
510 }], | |
469 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', { | 511 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', { |
470 'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter', | 512 'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter', |
471 '-Wnon-virtual-dtor', '-Woverloaded-virtual', | 513 '-Wnon-virtual-dtor', '-Woverloaded-virtual', |
472 '<(wno_array_bounds)' ], | 514 '<(wno_array_bounds)' ], |
473 'conditions': [ | 515 'conditions': [ |
516 ['v8_optimized_debug==0', { | |
517 'cflags!': [ | |
518 '-O1', | |
519 '-O2', | |
520 '-O3', | |
521 '-Os', | |
522 ], | |
523 'cflags': [ | |
524 '-O0', | |
525 ], | |
526 }], | |
474 ['v8_optimized_debug==1', { | 527 ['v8_optimized_debug==1', { |
475 'cflags!': [ | 528 'cflags!': [ |
476 '-O0', | 529 '-O0', |
477 '-O2', | 530 '-O3', |
478 '-Os', | 531 '-Os', |
479 ], | 532 ], |
480 'cflags': [ | 533 'cflags': [ |
481 '-fdata-sections', | 534 '-fdata-sections', |
482 '-ffunction-sections', | 535 '-ffunction-sections', |
483 '-O1', | 536 '-O1', |
484 ], | 537 ], |
485 }], | 538 }], |
486 ['v8_optimized_debug==1 and gcc_version==44 and clang==0', { | 539 ['v8_optimized_debug==3', { |
540 'cflags!': [ | |
541 '-O0', | |
542 '-O1', | |
543 '-Os', | |
544 '-g', | |
545 ], | |
546 'cflags': [ | |
547 '-fdata-sections', | |
548 '-ffunction-sections', | |
549 '-O3', | |
550 ], | |
551 }], | |
552 ['v8_optimized_debug!=0 and gcc_version==44 and clang==0', { | |
487 'cflags': [ | 553 'cflags': [ |
488 # Avoid crashes with gcc 4.4 in the v8 test suite. | 554 # Avoid crashes with gcc 4.4 in the v8 test suite. |
489 '-fno-tree-vrp', | 555 '-fno-tree-vrp', |
490 ], | 556 ], |
491 }], | 557 }], |
492 ], | 558 ], |
493 }], | 559 }], |
494 ['OS=="linux" and v8_enable_backtrace==1', { | 560 ['OS=="linux" and v8_enable_backtrace==1', { |
495 # Support for backtrace_symbols. | 561 # Support for backtrace_symbols. |
496 'ldflags': [ '-rdynamic' ], | 562 'ldflags': [ '-rdynamic' ], |
497 }], | 563 }], |
498 ['OS=="android"', { | 564 ['OS=="android"', { |
499 'variables': { | 565 'variables': { |
500 'android_full_debug%': 1, | 566 'android_full_debug%': 1, |
501 }, | 567 }, |
502 'conditions': [ | 568 'conditions': [ |
503 ['android_full_debug==0', { | 569 ['android_full_debug==0', { |
504 # Disable full debug if we want a faster v8 in a debug build. | 570 # Disable full debug if we want a faster v8 in a debug build. |
505 # TODO(2304): pass DISABLE_DEBUG_ASSERT instead of hiding DEBUG. | 571 # TODO(2304): pass DISABLE_DEBUG_ASSERT instead of hiding DEBUG. |
506 'defines!': [ | 572 'defines!': [ |
507 'DEBUG', | 573 'DEBUG', |
508 ], | 574 ], |
509 }], | 575 }], |
510 ], | 576 ], |
511 }], | 577 }], |
512 ['OS=="mac"', { | 578 ['OS=="mac"', { |
513 'xcode_settings': { | 579 'xcode_settings': { |
514 'conditions': [ | 580 'conditions': [ |
581 ['v8_optimized_debug==0', { | |
582 'GCC_OPTIMIZATION_LEVEL': '0', # -O0 | |
583 }], | |
515 ['v8_optimized_debug==1', { | 584 ['v8_optimized_debug==1', { |
516 'GCC_OPTIMIZATION_LEVEL': '1', # -O1 | 585 'GCC_OPTIMIZATION_LEVEL': '1', # -O1 |
517 'GCC_STRICT_ALIASING': 'YES', | 586 'GCC_STRICT_ALIASING': 'YES', |
518 }, { | 587 }], |
519 'GCC_OPTIMIZATION_LEVEL': '0', # -O0 | 588 ['v8_optimized_debug==3', { |
589 'GCC_OPTIMIZATION_LEVEL': '3', # -O3 | |
590 'GCC_STRICT_ALIASING': 'YES', | |
520 }], | 591 }], |
521 ], | 592 ], |
522 }, | 593 }, |
523 }], | 594 }], |
524 ], | 595 ], |
525 }, # Debug | 596 }, # Debug |
526 'Release': { | 597 'Release': { |
527 'conditions': [ | 598 'conditions': [ |
528 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', { | 599 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', { |
529 'cflags!': [ | 600 'cflags!': [ |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
600 'OptimizeReferences': '2', | 671 'OptimizeReferences': '2', |
601 'EnableCOMDATFolding': '2', | 672 'EnableCOMDATFolding': '2', |
602 }, | 673 }, |
603 }, | 674 }, |
604 }], # OS=="win" | 675 }], # OS=="win" |
605 ], # conditions | 676 ], # conditions |
606 }, # Release | 677 }, # Release |
607 }, # configurations | 678 }, # configurations |
608 }, # target_defaults | 679 }, # target_defaults |
609 } | 680 } |
OLD | NEW |