summaryrefslogtreecommitdiffstats
path: root/build/common.gypi
diff options
context:
space:
mode:
authordkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-20 19:11:31 +0000
committerdkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-20 19:11:31 +0000
commitc5bdc032b4286a03be4e39fc5ca2895c97fc7f9f (patch)
treeb8d5ed4368254b766b1502cb35e5bff57e89cab8 /build/common.gypi
parentc98911a3fe397932e43700219ba22fa725745cac (diff)
downloadchromium_src-c5bdc032b4286a03be4e39fc5ca2895c97fc7f9f.zip
chromium_src-c5bdc032b4286a03be4e39fc5ca2895c97fc7f9f.tar.gz
chromium_src-c5bdc032b4286a03be4e39fc5ca2895c97fc7f9f.tar.bz2
Add a new option, debug_optimize, that lets you set the
optimization level used for debug builds on linux. They still default to -O0, but you can set them to -O1 by doing 'gyp -Ddebug_optimize=1'. This cuts valgrind runtime without screwing up stack dumps too badly. On the buildbot, the easiest way to use this is to create the file ~/.gyp/include.gypi by hand, containing the lines # Override for valgrind buildbot { 'variables': { 'debug_optimize': '1', }, } From then on, any "gclient sync" run, when it runs gyp after finishing, will cause debug builds to use -O1. This is a bit obscure, but it's a heck of a lot easier than threading some flag value through the buildbot scripts or adding a new build mode. Review URL: http://codereview.chromium.org/67199 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14046 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/common.gypi')
-rw-r--r--build/common.gypi5
1 files changed, 4 insertions, 1 deletions
diff --git a/build/common.gypi b/build/common.gypi
index 6a67a24..84fd9a9 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -231,11 +231,14 @@
],
'configurations': {
'Debug': {
+ 'variables': {
+ 'debug_optimize%': '0',
+ },
'defines': [
'_DEBUG',
],
'cflags': [
- '-O0',
+ '-O<(debug_optimize)',
'-g',
],
},