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 | |
64 'v8_optimized_debug%': 0, | 67 'v8_optimized_debug%': 0, |
65 | 68 |
69 # #defines ENABLE_CHECK et al in Debug. On by default. | |
70 'v8_enable_checks_in_debug%': 1, | |
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, |
75 | 81 |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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': [ | 443 'defines': [ |
438 'DEBUG', | |
439 'ENABLE_DISASSEMBLER', | 444 'ENABLE_DISASSEMBLER', |
440 'V8_ENABLE_CHECKS', | 445 'V8_ENABLE_CHECKS', |
441 'OBJECT_PRINT', | 446 'OBJECT_PRINT', |
442 'VERIFY_HEAP', | 447 'VERIFY_HEAP', |
Dirk Pranke
2013/07/23 02:02:01
Okay, from *initial* testing on linux, it looks li
| |
443 ], | 448 ], |
444 'msvs_settings': { | 449 'msvs_settings': { |
445 'VCCLCompilerTool': { | 450 'VCCLCompilerTool': { |
446 'conditions': [ | 451 'conditions': [ |
447 ['component=="shared_library"', { | 452 ['component=="shared_library"', { |
448 'RuntimeLibrary': '3', # /MDd | 453 'RuntimeLibrary': '3', # /MDd |
449 }, { | 454 }, { |
450 'RuntimeLibrary': '1', # /MTd | 455 'RuntimeLibrary': '1', # /MTd |
451 }], | 456 }], |
457 ['v8_optimized_debug==0', { | |
458 'Optimization': '0', | |
459 }], | |
452 ['v8_optimized_debug==1', { | 460 ['v8_optimized_debug==1', { |
453 'Optimization': '1', | 461 'Optimization': '1', |
454 'InlineFunctionExpansion': '2', | 462 'InlineFunctionExpansion': '2', |
455 'EnableIntrinsicFunctions': 'true', | 463 'EnableIntrinsicFunctions': 'true', |
456 'FavorSizeOrSpeed': '0', | 464 'FavorSizeOrSpeed': '0', |
457 'StringPooling': 'true', | 465 'StringPooling': 'true', |
458 'BasicRuntimeChecks': '0', | 466 'BasicRuntimeChecks': '0', |
459 }, { | 467 }], |
460 'Optimization': '0', | 468 ['v8_optimized_debug==3', { |
469 'Optimization': '2', | |
470 'InlineFunctionExpansion': '2', | |
471 'EnableIntrinsicFunctions': 'true', | |
472 'FavorSizeOrSpeed': '0', | |
473 'StringPooling': 'true', | |
474 'BasicRuntimeChecks': '0', | |
Dirk Pranke
2013/07/23 02:02:01
This was a flag missed on Windows that would cause
| |
475 'conditions': [ | |
476 ['component=="shared_library"', { | |
477 'RuntimeLibrary': '2', #/MD | |
478 }, { | |
479 'RuntimeLibrary': '0', #/MT | |
480 }], | |
481 ['v8_target_arch=="x64"', { | |
482 # TODO(2207): remove this option once the bug is fixed. | |
483 'WholeProgramOptimization': 'true', | |
484 }], | |
485 ], | |
461 }], | 486 }], |
462 ], | 487 ], |
463 }, | 488 }, |
464 'VCLinkerTool': { | 489 'VCLinkerTool': { |
465 'LinkIncremental': '2', | 490 'conditions': [ |
491 ['v8_optimized_debug==0', { | |
492 'LinkIncremental': '2', | |
493 }], | |
494 ['v8_optimized_debug==1', { | |
495 'LinkIncremental': '2', | |
496 }], | |
497 ['v8_optimized_debug==3', { | |
498 'LinkIncremental': '1', | |
499 'OptimizeReferences': '2', | |
500 'EnableCOMDATFolding': '2', | |
501 }], | |
502 ], | |
466 }, | 503 }, |
467 }, | 504 }, |
468 'conditions': [ | 505 'conditions': [ |
506 ['v8_enable_checks_in_debug==1', { | |
507 'defines': [ | |
508 'DEBUG', | |
509 ], | |
510 }, { | |
511 'defines': [ | |
512 'NDEBUG', | |
513 ], | |
Dirk Pranke
2013/07/23 02:02:01
See comments above. This also means that 'v8_enabl
| |
514 }], | |
469 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', { | 515 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', { |
470 'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter', | 516 'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter', |
471 '-Wnon-virtual-dtor', '-Woverloaded-virtual', | 517 '-Wnon-virtual-dtor', '-Woverloaded-virtual', |
472 '<(wno_array_bounds)' ], | 518 '<(wno_array_bounds)' ], |
473 'conditions': [ | 519 'conditions': [ |
520 ['v8_optimized_debug==0', { | |
521 'cflags!': [ | |
522 '-O1', | |
523 '-O2', | |
524 '-O3', | |
525 '-Os', | |
526 ], | |
527 'cflags': [ | |
528 '-O0', | |
529 ], | |
530 }], | |
474 ['v8_optimized_debug==1', { | 531 ['v8_optimized_debug==1', { |
475 'cflags!': [ | 532 'cflags!': [ |
476 '-O0', | 533 '-O0', |
477 '-O2', | 534 '-O3', |
478 '-Os', | 535 '-Os', |
479 ], | 536 ], |
480 'cflags': [ | 537 'cflags': [ |
481 '-fdata-sections', | 538 '-fdata-sections', |
482 '-ffunction-sections', | 539 '-ffunction-sections', |
483 '-O1', | 540 '-O1', |
484 ], | 541 ], |
485 }], | 542 }], |
486 ['v8_optimized_debug==1 and gcc_version==44 and clang==0', { | 543 ['v8_optimized_debug==3', { |
544 'cflags!': [ | |
545 '-O0', | |
546 '-O1', | |
547 '-Os', | |
548 '-g', | |
549 ], | |
550 'cflags': [ | |
551 '-fdata-sections', | |
552 '-ffunction-sections', | |
553 '-O3', | |
554 ], | |
555 }], | |
556 ['v8_optimized_debug!=0 and gcc_version==44 and clang==0', { | |
487 'cflags': [ | 557 'cflags': [ |
488 # Avoid crashes with gcc 4.4 in the v8 test suite. | 558 # Avoid crashes with gcc 4.4 in the v8 test suite. |
489 '-fno-tree-vrp', | 559 '-fno-tree-vrp', |
490 ], | 560 ], |
491 }], | 561 }], |
492 ], | 562 ], |
493 }], | 563 }], |
494 ['OS=="linux" and v8_enable_backtrace==1', { | 564 ['OS=="linux" and v8_enable_backtrace==1', { |
495 # Support for backtrace_symbols. | 565 # Support for backtrace_symbols. |
496 'ldflags': [ '-rdynamic' ], | 566 'ldflags': [ '-rdynamic' ], |
497 }], | 567 }], |
498 ['OS=="android"', { | 568 ['OS=="android"', { |
499 'variables': { | 569 'variables': { |
500 'android_full_debug%': 1, | 570 'android_full_debug%': 1, |
501 }, | 571 }, |
502 'conditions': [ | 572 'conditions': [ |
503 ['android_full_debug==0', { | 573 ['android_full_debug==0', { |
504 # Disable full debug if we want a faster v8 in a debug build. | 574 # Disable full debug if we want a faster v8 in a debug build. |
505 # TODO(2304): pass DISABLE_DEBUG_ASSERT instead of hiding DEBUG. | 575 # TODO(2304): pass DISABLE_DEBUG_ASSERT instead of hiding DEBUG. |
506 'defines!': [ | 576 'defines!': [ |
507 'DEBUG', | 577 'DEBUG', |
508 ], | 578 ], |
509 }], | 579 }], |
510 ], | 580 ], |
511 }], | 581 }], |
512 ['OS=="mac"', { | 582 ['OS=="mac"', { |
513 'xcode_settings': { | 583 'xcode_settings': { |
514 'conditions': [ | 584 'conditions': [ |
585 ['v8_optimized_debug==0', { | |
586 'GCC_OPTIMIZATION_LEVEL': '0', # -O0 | |
587 }], | |
515 ['v8_optimized_debug==1', { | 588 ['v8_optimized_debug==1', { |
516 'GCC_OPTIMIZATION_LEVEL': '1', # -O1 | 589 'GCC_OPTIMIZATION_LEVEL': '1', # -O1 |
517 'GCC_STRICT_ALIASING': 'YES', | 590 'GCC_STRICT_ALIASING': 'YES', |
518 }, { | 591 }], |
519 'GCC_OPTIMIZATION_LEVEL': '0', # -O0 | 592 ['v8_optimized_debug==3', { |
593 'GCC_OPTIMIZATION_LEVEL': '3', # -O3 | |
594 'GCC_STRICT_ALIASING': 'YES', | |
520 }], | 595 }], |
521 ], | 596 ], |
522 }, | 597 }, |
523 }], | 598 }], |
524 ], | 599 ], |
525 }, # Debug | 600 }, # Debug |
526 'Release': { | 601 'Release': { |
527 'conditions': [ | 602 'conditions': [ |
528 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', { | 603 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', { |
529 'cflags!': [ | 604 'cflags!': [ |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
600 'OptimizeReferences': '2', | 675 'OptimizeReferences': '2', |
601 'EnableCOMDATFolding': '2', | 676 'EnableCOMDATFolding': '2', |
602 }, | 677 }, |
603 }, | 678 }, |
604 }], # OS=="win" | 679 }], # OS=="win" |
605 ], # conditions | 680 ], # conditions |
606 }, # Release | 681 }, # Release |
607 }, # configurations | 682 }, # configurations |
608 }, # target_defaults | 683 }, # target_defaults |
609 } | 684 } |
OLD | NEW |