Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(236)

Side by Side Diff: build/toolchain.gypi

Issue 19384011: Revamp v8_optimized_debug options (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@master
Patch Set: use -O3 when v8_optimized_debug==2 Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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. 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.
64 'v8_optimized_debug%': 0, 76 'v8_optimized_debug%': 0,
65 77
66 # Enable profiling support. Only required on Windows. 78 # Enable profiling support. Only required on Windows.
67 'v8_enable_prof%': 0, 79 'v8_enable_prof%': 0,
68 80
69 # Some versions of GCC 4.5 seem to need -fno-strict-aliasing. 81 # Some versions of GCC 4.5 seem to need -fno-strict-aliasing.
70 'v8_no_strict_aliasing%': 0, 82 'v8_no_strict_aliasing%': 0,
71 83
72 # Chrome needs this definition unconditionally. For standalone V8 builds, 84 # Chrome needs this definition unconditionally. For standalone V8 builds,
73 # it's handled in build/standalone.gypi. 85 # it's handled in build/standalone.gypi.
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 ['OS=="freebsd" or OS=="openbsd"', { 440 ['OS=="freebsd" or OS=="openbsd"', {
429 'cflags': [ '-I/usr/local/include' ], 441 'cflags': [ '-I/usr/local/include' ],
430 }], 442 }],
431 ['OS=="netbsd"', { 443 ['OS=="netbsd"', {
432 'cflags': [ '-I/usr/pkg/include' ], 444 'cflags': [ '-I/usr/pkg/include' ],
433 }], 445 }],
434 ], # conditions 446 ], # conditions
435 'configurations': { 447 'configurations': {
436 'Debug': { 448 'Debug': {
437 'defines': [ 449 'defines': [
438 'DEBUG',
439 'ENABLE_DISASSEMBLER', 450 'ENABLE_DISASSEMBLER',
440 'V8_ENABLE_CHECKS', 451 'V8_ENABLE_CHECKS',
441 'OBJECT_PRINT', 452 'OBJECT_PRINT',
442 'VERIFY_HEAP', 453 'VERIFY_HEAP',
443 ], 454 ],
444 'msvs_settings': { 455 'msvs_settings': {
445 'VCCLCompilerTool': { 456 'VCCLCompilerTool': {
446 'conditions': [ 457 'conditions': [
447 ['component=="shared_library"', { 458 ['component=="shared_library"', {
448 'RuntimeLibrary': '3', # /MDd 459 'RuntimeLibrary': '3', # /MDd
449 }, { 460 }, {
450 'RuntimeLibrary': '1', # /MTd 461 'RuntimeLibrary': '1', # /MTd
451 }], 462 }],
452 ['v8_optimized_debug==1', { 463 ['v8_optimized_debug==0', {
453 'Optimization': '1', 464 'Optimization': '0',
465 }, {
466 'Optimization': '2',
454 'InlineFunctionExpansion': '2', 467 'InlineFunctionExpansion': '2',
455 'EnableIntrinsicFunctions': 'true', 468 'EnableIntrinsicFunctions': 'true',
456 'FavorSizeOrSpeed': '0', 469 'FavorSizeOrSpeed': '0',
457 'StringPooling': 'true', 470 'StringPooling': 'true',
458 'BasicRuntimeChecks': '0', 471 'BasicRuntimeChecks': '0',
459 }, { 472 'conditions': [
460 'Optimization': '0', 473 ['component=="shared_library"', {
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 ],
461 }], 483 }],
462 ], 484 ],
463 }, 485 },
464 'VCLinkerTool': { 486 'VCLinkerTool': {
465 'LinkIncremental': '2', 487 'conditions': [
488 ['v8_optimized_debug==0', {
489 'LinkIncremental': '2',
490 }, {
491 'LinkIncremental': '1',
492 'OptimizeReferences': '2',
493 'EnableCOMDATFolding': '2',
494 }],
495 ],
466 }, 496 },
467 }, 497 },
468 'conditions': [ 498 'conditions': [
499 ['v8_optimized_debug==2', {
500 'defines': [
501 'NDEBUG',
502 ],
503 }, {
504 'defines': [
505 'DEBUG',
506 ],
507 }],
469 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', { 508 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', {
470 'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter', 509 'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter',
471 '-Wnon-virtual-dtor', '-Woverloaded-virtual', 510 '-Wnon-virtual-dtor', '-Woverloaded-virtual',
472 '<(wno_array_bounds)' ], 511 '<(wno_array_bounds)' ],
473 'conditions': [ 512 '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 }],
474 ['v8_optimized_debug==1', { 526 ['v8_optimized_debug==1', {
475 'cflags!': [ 527 'cflags!': [
476 '-O0', 528 '-O0',
529 '-O3', # TODO(2807) should be -O1.
477 '-O2', 530 '-O2',
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', # TODO(2807) should be -O3.
484 ], 537 ],
485 }], 538 }],
486 ['v8_optimized_debug==1 and gcc_version==44 and clang==0', { 539 ['v8_optimized_debug==2', {
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', {
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': [
515 ['v8_optimized_debug==1', { 581 ['v8_optimized_debug==0', {
516 'GCC_OPTIMIZATION_LEVEL': '1', # -O1 582 'GCC_OPTIMIZATION_LEVEL': '0', # -O0
583 }, {
584 'GCC_OPTIMIZATION_LEVEL': '3', # -O3
517 'GCC_STRICT_ALIASING': 'YES', 585 'GCC_STRICT_ALIASING': 'YES',
518 }, {
519 'GCC_OPTIMIZATION_LEVEL': '0', # -O0
520 }], 586 }],
521 ], 587 ],
522 }, 588 },
523 }], 589 }],
524 ], 590 ],
525 }, # Debug 591 }, # Debug
526 'Release': { 592 'Release': {
527 'conditions': [ 593 'conditions': [
528 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', { 594 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', {
529 'cflags!': [ 595 'cflags!': [
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 'OptimizeReferences': '2', 666 'OptimizeReferences': '2',
601 'EnableCOMDATFolding': '2', 667 'EnableCOMDATFolding': '2',
602 }, 668 },
603 }, 669 },
604 }], # OS=="win" 670 }], # OS=="win"
605 ], # conditions 671 ], # conditions
606 }, # Release 672 }, # Release
607 }, # configurations 673 }, # configurations
608 }, # target_defaults 674 }, # target_defaults
609 } 675 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698