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

Unified Diff: build/toolchain.gypi

Issue 224443003: Use abstract configurations to switch between opt debug settings (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/standalone.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/toolchain.gypi
diff --git a/build/toolchain.gypi b/build/toolchain.gypi
index dc25036daa67c544e13c119e546d3c2862b7deb8..154ee99796b18d2c3bd2b9018a545708705de654 100644
--- a/build/toolchain.gypi
+++ b/build/toolchain.gypi
@@ -445,135 +445,154 @@
}],
], # conditions
'configurations': {
- 'Debug': {
- 'defines': [
- 'ENABLE_DISASSEMBLER',
- 'V8_ENABLE_CHECKS',
- 'OBJECT_PRINT',
- 'VERIFY_HEAP',
- 'DEBUG'
- ],
+ # Abstract configuration for v8_optimized_debug == 0.
+ 'DebugBase0': {
+ 'abstract': 1,
'msvs_settings': {
'VCCLCompilerTool': {
+ 'Optimization': '0',
'conditions': [
- ['v8_optimized_debug==0', {
- 'Optimization': '0',
- 'conditions': [
- ['component=="shared_library"', {
- 'RuntimeLibrary': '3', # /MDd
- }, {
- 'RuntimeLibrary': '1', # /MTd
- }],
- ],
- }],
- ['v8_optimized_debug==1', {
- 'Optimization': '1',
- 'InlineFunctionExpansion': '2',
- 'EnableIntrinsicFunctions': 'true',
- 'FavorSizeOrSpeed': '0',
- 'StringPooling': 'true',
- 'BasicRuntimeChecks': '0',
- 'conditions': [
- ['component=="shared_library"', {
- 'RuntimeLibrary': '3', # /MDd
- }, {
- 'RuntimeLibrary': '1', # /MTd
- }],
- ],
- }],
- ['v8_optimized_debug==2', {
- 'Optimization': '2',
- 'InlineFunctionExpansion': '2',
- 'EnableIntrinsicFunctions': 'true',
- 'FavorSizeOrSpeed': '0',
- 'StringPooling': 'true',
- 'BasicRuntimeChecks': '0',
- 'conditions': [
- ['component=="shared_library"', {
- 'RuntimeLibrary': '3', #/MDd
- }, {
- 'RuntimeLibrary': '1', #/MTd
- }],
- ['v8_target_arch=="x64"', {
- # TODO(2207): remove this option once the bug is fixed.
- 'WholeProgramOptimization': 'true',
- }],
- ],
+ ['component=="shared_library"', {
+ 'RuntimeLibrary': '3', # /MDd
+ }, {
+ 'RuntimeLibrary': '1', # /MTd
}],
],
},
'VCLinkerTool': {
+ 'LinkIncremental': '2',
+ },
+ },
+ 'conditions': [
+ ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \
+ OS=="qnx"', {
+ 'cflags!': [
+ '-O0',
+ '-O3',
+ '-O2',
+ '-O1',
+ '-Os',
+ ],
+ 'cflags': [
+ '-fdata-sections',
+ '-ffunction-sections',
+ ],
+ }],
+ ['OS=="mac"', {
+ 'xcode_settings': {
+ 'GCC_OPTIMIZATION_LEVEL': '0', # -O0
+ },
+ }],
+ ],
+ }, # DebugBase0
+ # Abstract configuration for v8_optimized_debug == 1.
+ 'DebugBase1': {
+ 'abstract': 1,
+ 'msvs_settings': {
+ 'VCCLCompilerTool': {
+ 'Optimization': '1',
+ 'InlineFunctionExpansion': '2',
+ 'EnableIntrinsicFunctions': 'true',
+ 'FavorSizeOrSpeed': '0',
+ 'StringPooling': 'true',
+ 'BasicRuntimeChecks': '0',
'conditions': [
- ['v8_optimized_debug==0', {
- 'LinkIncremental': '2',
- }],
- ['v8_optimized_debug==1', {
- 'LinkIncremental': '2',
- }],
- ['v8_optimized_debug==2', {
- 'LinkIncremental': '1',
- 'OptimizeReferences': '2',
- 'EnableCOMDATFolding': '2',
+ ['component=="shared_library"', {
+ 'RuntimeLibrary': '3', # /MDd
+ }, {
+ 'RuntimeLibrary': '1', # /MTd
}],
],
},
+ 'VCLinkerTool': {
+ 'LinkIncremental': '2',
+ },
},
'conditions': [
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \
OS=="qnx"', {
- 'cflags': [ '-Woverloaded-virtual', '<(wno_array_bounds)', ],
+ 'cflags!': [
+ '-O0',
+ '-O3', # TODO(2807) should be -O1.
+ '-O2',
+ '-Os',
+ ],
+ 'cflags': [
+ '-fdata-sections',
+ '-ffunction-sections',
+ '-O1', # TODO(2807) should be -O3.
+ ],
'conditions': [
- ['v8_optimized_debug==0', {
- 'cflags!': [
- '-O0',
- '-O3',
- '-O2',
- '-O1',
- '-Os',
- ],
+ ['gcc_version==44 and clang==0', {
'cflags': [
- '-fdata-sections',
- '-ffunction-sections',
+ # Avoid crashes with gcc 4.4 in the v8 test suite.
+ '-fno-tree-vrp',
],
}],
- ['v8_optimized_debug==1', {
- 'cflags!': [
- '-O0',
- '-O3', # TODO(2807) should be -O1.
- '-O2',
- '-Os',
- ],
- 'cflags': [
- '-fdata-sections',
- '-ffunction-sections',
- '-O1', # TODO(2807) should be -O3.
- ],
+ ],
+ }],
+ ['OS=="mac"', {
+ 'xcode_settings': {
+ 'GCC_OPTIMIZATION_LEVEL': '3', # -O3
+ 'GCC_STRICT_ALIASING': 'YES',
+ },
+ }],
+ ],
+ }, # DebugBase1
+ # Abstract configuration for v8_optimized_debug == 2.
+ 'DebugBase2': {
+ 'abstract': 1,
+ 'msvs_settings': {
+ 'VCCLCompilerTool': {
+ 'Optimization': '2',
+ 'InlineFunctionExpansion': '2',
+ 'EnableIntrinsicFunctions': 'true',
+ 'FavorSizeOrSpeed': '0',
+ 'StringPooling': 'true',
+ 'BasicRuntimeChecks': '0',
+ 'conditions': [
+ ['component=="shared_library"', {
+ 'RuntimeLibrary': '3', #/MDd
+ }, {
+ 'RuntimeLibrary': '1', #/MTd
}],
- ['v8_optimized_debug==2', {
- 'cflags!': [
- '-O0',
- '-O1',
- '-Os',
- ],
- 'cflags': [
- '-fdata-sections',
- '-ffunction-sections',
- ],
- 'defines': [
- 'OPTIMIZED_DEBUG'
- ],
- 'conditions': [
- # TODO(crbug.com/272548): Avoid -O3 in NaCl
- ['nacl_target_arch=="none"', {
- 'cflags': ['-O3'],
- 'cflags!': ['-O2'],
- }, {
- 'cflags': ['-O2'],
- 'cflags!': ['-O3'],
- }],
- ],
+ ['v8_target_arch=="x64"', {
+ # TODO(2207): remove this option once the bug is fixed.
+ 'WholeProgramOptimization': 'true',
+ }],
+ ],
+ },
+ 'VCLinkerTool': {
+ 'LinkIncremental': '1',
+ 'OptimizeReferences': '2',
+ 'EnableCOMDATFolding': '2',
+ },
+ },
+ 'conditions': [
+ ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \
+ OS=="qnx"', {
+ 'cflags!': [
+ '-O0',
+ '-O1',
+ '-Os',
+ ],
+ 'cflags': [
+ '-fdata-sections',
+ '-ffunction-sections',
+ ],
+ 'defines': [
+ 'OPTIMIZED_DEBUG'
+ ],
+ 'conditions': [
+ # TODO(crbug.com/272548): Avoid -O3 in NaCl
+ ['nacl_target_arch=="none"', {
+ 'cflags': ['-O3'],
+ 'cflags!': ['-O2'],
+ }, {
+ 'cflags': ['-O2'],
+ 'cflags!': ['-O3'],
}],
- ['v8_optimized_debug!=0 and gcc_version==44 and clang==0', {
+ ['gcc_version==44 and clang==0', {
'cflags': [
# Avoid crashes with gcc 4.4 in the v8 test suite.
'-fno-tree-vrp',
@@ -581,6 +600,29 @@
}],
],
}],
+ ['OS=="mac"', {
+ 'xcode_settings': {
+ 'GCC_OPTIMIZATION_LEVEL': '3', # -O3
+ 'GCC_STRICT_ALIASING': 'YES',
+ },
+ }],
+ ],
+ }, # DebugBase2
+ # Common settings for the Debug configuration.
+ 'DebugBaseCommon': {
+ 'abstract': 1,
+ 'defines': [
+ 'ENABLE_DISASSEMBLER',
+ 'V8_ENABLE_CHECKS',
+ 'OBJECT_PRINT',
+ 'VERIFY_HEAP',
+ 'DEBUG'
+ ],
+ 'conditions': [
+ ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \
+ OS=="qnx"', {
+ 'cflags': [ '-Woverloaded-virtual', '<(wno_array_bounds)', ],
+ }],
['OS=="linux" and v8_enable_backtrace==1', {
# Support for backtrace_symbols.
'ldflags': [ '-rdynamic' ],
@@ -599,17 +641,19 @@
}],
],
}],
- ['OS=="mac"', {
- 'xcode_settings': {
- 'conditions': [
- ['v8_optimized_debug==0', {
- 'GCC_OPTIMIZATION_LEVEL': '0', # -O0
- }, {
- 'GCC_OPTIMIZATION_LEVEL': '3', # -O3
- 'GCC_STRICT_ALIASING': 'YES',
- }],
- ],
- },
+ ],
+ }, # DebugBaseCommon
+ 'Debug': {
+ 'inherit_from': ['DebugBaseCommon'],
+ 'conditions': [
+ ['v8_optimized_debug==0', {
+ 'inherit_from': ['DebugBase0'],
+ }],
+ ['v8_optimized_debug==1', {
+ 'inherit_from': ['DebugBase1'],
+ }],
+ ['v8_optimized_debug==2', {
+ 'inherit_from': ['DebugBase2'],
}],
],
}, # Debug
« no previous file with comments | « build/standalone.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698