Commit d426cd10 authored by jochen@chromium.org's avatar jochen@chromium.org

Use abstract configurations to switch between opt debug settings

The problem is that conditions are evaluated before configuration inheritance is resolved, so we can't just define a configuration like this:

'Optdebug': {
  'inherits_from': ['Debug'],
  'variables': {
    'v8_optimized_debug': 2,
  }
}

Instead, we have to put the different settings depending on the optimization level into separate configurations, and use conditions inside the concrete configurations to inherit from the correct base class.

Common settings go in the base configuration DebugBaseCommon, and v8_optimized_debug dependent settings go into DebugBase{0,1,2}

The new Debug configuration inherits from DebugBaseCommon and DebugBase<(v8_optimized_debug), while the new configuration Optdebug inherits from DebugBaseCommon and DebugBase2.

BUG=v8:3252
R=machenbach@chromium.org, jkummerow@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/224443003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20605 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 728614da
......@@ -98,7 +98,8 @@
}],
], # conditions
'configurations': {
'Debug': {
'DebugBaseCommon': {
'abstract': 1,
'variables': {
'v8_enable_extra_checks%': 1,
'v8_enable_handle_zapping%': 1,
......
......@@ -135,9 +135,15 @@
},
'default_configuration': 'Debug',
'configurations': {
'Debug': {
'DebugBaseCommon': {
'cflags': [ '-g', '-O0' ],
},
'Optdebug': {
'inherit_from': [ 'DebugBaseCommon', 'DebugBase2' ],
},
'Debug': {
# Xcode insists on this empty entry.
},
'Release': {
# Xcode insists on this empty entry.
},
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment