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
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: de016e52bd170d2d4f2344f9bf92d50478b649e0@14046 0039d316-1c4b-4281-b951-d872f2087c98

yitian134/chromium,yitian134/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,ropik/chromium,yitian134/chromium,ropik/chromium,yitian134/chromium,gavinp/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,adobe/chromium,adobe/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,ropik/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,gavinp/chromium,gavinp/chromium,ropik/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,adobe/chromium,gavinp/chromium,yitian134/chromium,ropik/chromium,gavinp/chromium,ropik/chromium,gavinp/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,yitian134/chromium,ropik/chromium