From c5bdc032b4286a03be4e39fc5ca2895c97fc7f9f Mon Sep 17 00:00:00 2001 From: "dkegel@google.com" Date: Mon, 20 Apr 2009 19:11:31 +0000 Subject: 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 --- build/common.gypi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'build/common.gypi') 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', ], }, -- cgit v1.1