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 # Speeds up Debug builds: | 63 # Turns on compiler optimizations in Debug builds (#defines are unaffected). |
64 # 0 - compiler optimizations off (debuggable) (default). This may | |
65 # be 5x slower than Release (or worse). | |
66 # 1 - turn on compiler optimizations. and #undef DEBUG/#define NDEBUG. | |
67 # This may be hard or impossible to debug. This may still be | |
68 # 2x slower than Release (or worse). | |
69 # 2 - Turn on optimizations, and also #undef DEBUG / #define NDEBUG | |
70 # (but leave V8_ENABLE_CHECKS and most other assertions enabled. | |
71 # This may cause some v8 tests to fail in the Debug configuration. | |
72 # This roughly matches the performance of a Release build and can | |
73 # be used by embedders that need to build their own code as debug | |
74 # but don't want or need a debug version of V8. This should produce | |
75 # near-release speeds. | |
76 'v8_optimized_debug%': 0, | 64 'v8_optimized_debug%': 0, |
77 | 65 |
78 # Enable profiling support. Only required on Windows. | 66 # Enable profiling support. Only required on Windows. |
79 'v8_enable_prof%': 0, | 67 'v8_enable_prof%': 0, |
80 | 68 |
81 # Some versions of GCC 4.5 seem to need -fno-strict-aliasing. | 69 # Some versions of GCC 4.5 seem to need -fno-strict-aliasing. |
82 'v8_no_strict_aliasing%': 0, | 70 'v8_no_strict_aliasing%': 0, |
83 | 71 |
84 # Chrome needs this definition unconditionally. For standalone V8 builds, | 72 # Chrome needs this definition unconditionally. For standalone V8 builds, |
85 # it's handled in build/standalone.gypi. | 73 # it's handled in build/standalone.gypi. |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 ['OS=="freebsd" or OS=="openbsd"', { | 428 ['OS=="freebsd" or OS=="openbsd"', { |
441 'cflags': [ '-I/usr/local/include' ], | 429 'cflags': [ '-I/usr/local/include' ], |
442 }], | 430 }], |
443 ['OS=="netbsd"', { | 431 ['OS=="netbsd"', { |
444 'cflags': [ '-I/usr/pkg/include' ], | 432 'cflags': [ '-I/usr/pkg/include' ], |
445 }], | 433 }], |
446 ], # conditions | 434 ], # conditions |
447 'configurations': { | 435 'configurations': { |
448 'Debug': { | 436 'Debug': { |
449 'defines': [ | 437 'defines': [ |
| 438 'DEBUG', |
450 'ENABLE_DISASSEMBLER', | 439 'ENABLE_DISASSEMBLER', |
451 'V8_ENABLE_CHECKS', | 440 'V8_ENABLE_CHECKS', |
452 'OBJECT_PRINT', | 441 'OBJECT_PRINT', |
453 'VERIFY_HEAP', | 442 'VERIFY_HEAP', |
454 ], | 443 ], |
455 'msvs_settings': { | 444 'msvs_settings': { |
456 'VCCLCompilerTool': { | 445 'VCCLCompilerTool': { |
457 'conditions': [ | 446 'conditions': [ |
458 ['component=="shared_library"', { | 447 ['component=="shared_library"', { |
459 'RuntimeLibrary': '3', # /MDd | 448 'RuntimeLibrary': '3', # /MDd |
460 }, { | 449 }, { |
461 'RuntimeLibrary': '1', # /MTd | 450 'RuntimeLibrary': '1', # /MTd |
462 }], | 451 }], |
463 ['v8_optimized_debug==0', { | 452 ['v8_optimized_debug==1', { |
464 'Optimization': '0', | 453 'Optimization': '1', |
465 }, { | |
466 'Optimization': '2', | |
467 'InlineFunctionExpansion': '2', | 454 'InlineFunctionExpansion': '2', |
468 'EnableIntrinsicFunctions': 'true', | 455 'EnableIntrinsicFunctions': 'true', |
469 'FavorSizeOrSpeed': '0', | 456 'FavorSizeOrSpeed': '0', |
470 'StringPooling': 'true', | 457 'StringPooling': 'true', |
471 'BasicRuntimeChecks': '0', | 458 'BasicRuntimeChecks': '0', |
472 'conditions': [ | 459 }, { |
473 ['component=="shared_library"', { | 460 'Optimization': '0', |
474 'RuntimeLibrary': '2', #/MD | |
475 }, { | |
476 'RuntimeLibrary': '0', #/MT | |
477 }], | |
478 ['v8_target_arch=="x64"', { | |
479 # TODO(2207): remove this option once the bug is fixed. | |
480 'WholeProgramOptimization': 'true', | |
481 }], | |
482 ], | |
483 }], | 461 }], |
484 ], | 462 ], |
485 }, | 463 }, |
486 'VCLinkerTool': { | 464 'VCLinkerTool': { |
487 'conditions': [ | 465 'LinkIncremental': '2', |
488 ['v8_optimized_debug==0', { | |
489 'LinkIncremental': '2', | |
490 }, { | |
491 'LinkIncremental': '1', | |
492 'OptimizeReferences': '2', | |
493 'EnableCOMDATFolding': '2', | |
494 }], | |
495 ], | |
496 }, | 466 }, |
497 }, | 467 }, |
498 'conditions': [ | 468 'conditions': [ |
499 ['v8_optimized_debug==2', { | |
500 'defines': [ | |
501 'NDEBUG', | |
502 ], | |
503 }, { | |
504 'defines': [ | |
505 'DEBUG', | |
506 ], | |
507 }], | |
508 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', { | 469 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', { |
509 'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter', | 470 'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter', |
510 '-Wnon-virtual-dtor', '-Woverloaded-virtual', | 471 '-Wnon-virtual-dtor', '-Woverloaded-virtual', |
511 '<(wno_array_bounds)' ], | 472 '<(wno_array_bounds)' ], |
512 'conditions': [ | 473 'conditions': [ |
513 ['v8_optimized_debug==0', { | |
514 'cflags!': [ | |
515 '-O0', | |
516 '-O3', | |
517 '-O2', | |
518 '-O1', | |
519 '-Os', | |
520 ], | |
521 'cflags': [ | |
522 '-fdata-sections', | |
523 '-ffunction-sections', | |
524 ], | |
525 }], | |
526 ['v8_optimized_debug==1', { | 474 ['v8_optimized_debug==1', { |
527 'cflags!': [ | 475 'cflags!': [ |
528 '-O0', | 476 '-O0', |
529 '-O3', # TODO(2807) should be -O1. | |
530 '-O2', | 477 '-O2', |
531 '-Os', | 478 '-Os', |
532 ], | 479 ], |
533 'cflags': [ | 480 'cflags': [ |
534 '-fdata-sections', | 481 '-fdata-sections', |
535 '-ffunction-sections', | 482 '-ffunction-sections', |
536 '-O1', # TODO(2807) should be -O3. | 483 '-O1', |
537 ], | 484 ], |
538 }], | 485 }], |
539 ['v8_optimized_debug==2', { | 486 ['v8_optimized_debug==1 and gcc_version==44 and clang==0', { |
540 'cflags!': [ | |
541 '-O0', | |
542 '-O1', | |
543 '-O2', | |
544 '-Os', | |
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', { | |
553 'cflags': [ | 487 'cflags': [ |
554 # Avoid crashes with gcc 4.4 in the v8 test suite. | 488 # Avoid crashes with gcc 4.4 in the v8 test suite. |
555 '-fno-tree-vrp', | 489 '-fno-tree-vrp', |
556 ], | 490 ], |
557 }], | 491 }], |
558 ], | 492 ], |
559 }], | 493 }], |
560 ['OS=="linux" and v8_enable_backtrace==1', { | 494 ['OS=="linux" and v8_enable_backtrace==1', { |
561 # Support for backtrace_symbols. | 495 # Support for backtrace_symbols. |
562 'ldflags': [ '-rdynamic' ], | 496 'ldflags': [ '-rdynamic' ], |
563 }], | 497 }], |
564 ['OS=="android"', { | 498 ['OS=="android"', { |
565 'variables': { | 499 'variables': { |
566 'android_full_debug%': 1, | 500 'android_full_debug%': 1, |
567 }, | 501 }, |
568 'conditions': [ | 502 'conditions': [ |
569 ['android_full_debug==0', { | 503 ['android_full_debug==0', { |
570 # Disable full debug if we want a faster v8 in a debug build. | 504 # Disable full debug if we want a faster v8 in a debug build. |
571 # TODO(2304): pass DISABLE_DEBUG_ASSERT instead of hiding DEBUG. | 505 # TODO(2304): pass DISABLE_DEBUG_ASSERT instead of hiding DEBUG. |
572 'defines!': [ | 506 'defines!': [ |
573 'DEBUG', | 507 'DEBUG', |
574 ], | 508 ], |
575 }], | 509 }], |
576 ], | 510 ], |
577 }], | 511 }], |
578 ['OS=="mac"', { | 512 ['OS=="mac"', { |
579 'xcode_settings': { | 513 'xcode_settings': { |
580 'conditions': [ | 514 'conditions': [ |
581 ['v8_optimized_debug==0', { | 515 ['v8_optimized_debug==1', { |
| 516 'GCC_OPTIMIZATION_LEVEL': '1', # -O1 |
| 517 'GCC_STRICT_ALIASING': 'YES', |
| 518 }, { |
582 'GCC_OPTIMIZATION_LEVEL': '0', # -O0 | 519 'GCC_OPTIMIZATION_LEVEL': '0', # -O0 |
583 }, { | |
584 'GCC_OPTIMIZATION_LEVEL': '3', # -O3 | |
585 'GCC_STRICT_ALIASING': 'YES', | |
586 }], | 520 }], |
587 ], | 521 ], |
588 }, | 522 }, |
589 }], | 523 }], |
590 ], | 524 ], |
591 }, # Debug | 525 }, # Debug |
592 'Release': { | 526 'Release': { |
593 'conditions': [ | 527 'conditions': [ |
594 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', { | 528 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', { |
595 'cflags!': [ | 529 'cflags!': [ |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 'OptimizeReferences': '2', | 600 'OptimizeReferences': '2', |
667 'EnableCOMDATFolding': '2', | 601 'EnableCOMDATFolding': '2', |
668 }, | 602 }, |
669 }, | 603 }, |
670 }], # OS=="win" | 604 }], # OS=="win" |
671 ], # conditions | 605 ], # conditions |
672 }, # Release | 606 }, # Release |
673 }, # configurations | 607 }, # configurations |
674 }, # target_defaults | 608 }, # target_defaults |
675 } | 609 } |
OLD | NEW |