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

Side by Side Diff: build/toolchain.gypi

Issue 18516012: Enable debug builds with some optimizations turned on. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review comments. 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 | Annotate | Revision Log
« 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 # Similar to vfp but on MIPS. 52 # Similar to vfp but on MIPS.
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
63 # Turns on compiler optimizations in Debug builds (#defines are unaffected).
64 'v8_optimized_debug%': 0,
65
62 # Enable profiling support. Only required on Windows. 66 # Enable profiling support. Only required on Windows.
63 'v8_enable_prof%': 0, 67 'v8_enable_prof%': 0,
64 68
65 # 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.
66 'v8_no_strict_aliasing%': 0, 70 'v8_no_strict_aliasing%': 0,
67 71
68 # Chrome needs this definition unconditionally. For standalone V8 builds, 72 # Chrome needs this definition unconditionally. For standalone V8 builds,
69 # it's handled in build/standalone.gypi. 73 # it's handled in build/standalone.gypi.
70 'want_separate_host_toolset%': 1, 74 'want_separate_host_toolset%': 1,
71 75
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 'Debug': { 433 'Debug': {
430 'defines': [ 434 'defines': [
431 'DEBUG', 435 'DEBUG',
432 'ENABLE_DISASSEMBLER', 436 'ENABLE_DISASSEMBLER',
433 'V8_ENABLE_CHECKS', 437 'V8_ENABLE_CHECKS',
434 'OBJECT_PRINT', 438 'OBJECT_PRINT',
435 'VERIFY_HEAP', 439 'VERIFY_HEAP',
436 ], 440 ],
437 'msvs_settings': { 441 'msvs_settings': {
438 'VCCLCompilerTool': { 442 'VCCLCompilerTool': {
439 'Optimization': '0',
440
441 'conditions': [ 443 'conditions': [
442 ['OS=="win" and component=="shared_library"', { 444 ['component=="shared_library"', {
443 'RuntimeLibrary': '3', # /MDd 445 'RuntimeLibrary': '3', # /MDd
444 }, { 446 }, {
445 'RuntimeLibrary': '1', # /MTd 447 'RuntimeLibrary': '1', # /MTd
446 }], 448 }],
449 ['v8_optimized_debug==1', {
450 'Optimization': '1',
451 'InlineFunctionExpansion': '2',
452 'EnableIntrinsicFunctions': 'true',
453 'FavorSizeOrSpeed': '0',
454 'StringPooling': 'true',
455 'BasicRuntimeChecks': '0',
456 }, {
457 'Optimization': '0',
458 }],
447 ], 459 ],
448 }, 460 },
449 'VCLinkerTool': { 461 'VCLinkerTool': {
450 'LinkIncremental': '2', 462 'LinkIncremental': '2',
451 }, 463 },
452 }, 464 },
453 'conditions': [ 465 'conditions': [
454 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', { 466 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', {
455 'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter', 467 'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter',
456 '-Wnon-virtual-dtor', '-Woverloaded-virtual' ], 468 '-Wnon-virtual-dtor', '-Woverloaded-virtual' ],
469 'conditions': [
470 ['v8_optimized_debug==1', {
471 'cflags!': [
472 '-O0',
473 '-O2',
474 '-Os',
475 ],
476 'cflags': [
477 '-fdata-sections',
478 '-ffunction-sections',
479 '-O1',
480 ],
481 }],
482 ['v8_optimized_debug==1 and gcc_version==44 and clang==0', {
483 'cflags': [
484 # Avoid crashes with gcc 4.4 in the v8 test suite.
485 '-fno-tree-vrp',
486 ],
487 }],
488 ],
457 }], 489 }],
458 ['OS=="linux" and v8_enable_backtrace==1', { 490 ['OS=="linux" and v8_enable_backtrace==1', {
459 # Support for backtrace_symbols. 491 # Support for backtrace_symbols.
460 'ldflags': [ '-rdynamic' ], 492 'ldflags': [ '-rdynamic' ],
461 }], 493 }],
462 ['OS=="android"', { 494 ['OS=="android"', {
463 'variables': { 495 'variables': {
464 'android_full_debug%': 1, 496 'android_full_debug%': 1,
465 }, 497 },
466 'conditions': [ 498 'conditions': [
467 ['android_full_debug==0', { 499 ['android_full_debug==0', {
468 # Disable full debug if we want a faster v8 in a debug build. 500 # Disable full debug if we want a faster v8 in a debug build.
469 # TODO(2304): pass DISABLE_DEBUG_ASSERT instead of hiding DEBUG. 501 # TODO(2304): pass DISABLE_DEBUG_ASSERT instead of hiding DEBUG.
470 'defines!': [ 502 'defines!': [
471 'DEBUG', 503 'DEBUG',
472 ], 504 ],
473 }], 505 }],
474 ], 506 ],
475 }], 507 }],
476 ['OS=="mac"', { 508 ['OS=="mac"', {
477 'xcode_settings': { 509 'xcode_settings': {
478 'GCC_OPTIMIZATION_LEVEL': '0', # -O0 510 'conditions': [
511 ['v8_optimized_debug==1', {
512 'GCC_OPTIMIZATION_LEVEL': '1', # -O1
513 'GCC_STRICT_ALIASING': 'YES',
Nico 2013/07/17 03:13:44 Note that strict aliasing is only done at -O2 or h
514 }, {
515 'GCC_OPTIMIZATION_LEVEL': '0', # -O0
516 }],
517 ],
479 }, 518 },
480 }], 519 }],
481 ], 520 ],
482 }, # Debug 521 }, # Debug
483 'Release': { 522 'Release': {
484 'conditions': [ 523 'conditions': [
485 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', { 524 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', {
486 'cflags!': [ 525 'cflags!': [
487 '-O2', 526 '-O2',
488 '-Os', 527 '-Os',
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 }], # OS=="mac" 572 }], # OS=="mac"
534 ['OS=="win"', { 573 ['OS=="win"', {
535 'msvs_settings': { 574 'msvs_settings': {
536 'VCCLCompilerTool': { 575 'VCCLCompilerTool': {
537 'Optimization': '2', 576 'Optimization': '2',
538 'InlineFunctionExpansion': '2', 577 'InlineFunctionExpansion': '2',
539 'EnableIntrinsicFunctions': 'true', 578 'EnableIntrinsicFunctions': 'true',
540 'FavorSizeOrSpeed': '0', 579 'FavorSizeOrSpeed': '0',
541 'StringPooling': 'true', 580 'StringPooling': 'true',
542 'conditions': [ 581 'conditions': [
543 ['OS=="win" and component=="shared_library"', { 582 ['component=="shared_library"', {
544 'RuntimeLibrary': '2', #/MD 583 'RuntimeLibrary': '2', #/MD
545 }, { 584 }, {
546 'RuntimeLibrary': '0', #/MT 585 'RuntimeLibrary': '0', #/MT
547 }], 586 }],
548 ['v8_target_arch=="x64"', { 587 ['v8_target_arch=="x64"', {
549 # TODO(2207): remove this option once the bug is fixed. 588 # TODO(2207): remove this option once the bug is fixed.
550 'WholeProgramOptimization': 'true', 589 'WholeProgramOptimization': 'true',
551 }], 590 }],
552 ], 591 ],
553 }, 592 },
554 'VCLinkerTool': { 593 'VCLinkerTool': {
555 'LinkIncremental': '1', 594 'LinkIncremental': '1',
556 'OptimizeReferences': '2', 595 'OptimizeReferences': '2',
557 'EnableCOMDATFolding': '2', 596 'EnableCOMDATFolding': '2',
558 }, 597 },
559 }, 598 },
560 }], # OS=="win" 599 }], # OS=="win"
561 ], # conditions 600 ], # conditions
562 }, # Release 601 }, # Release
563 }, # configurations 602 }, # configurations
564 }, # target_defaults 603 }, # target_defaults
565 } 604 }
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