diff options
author | bruening@chromium.org <bruening@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-17 02:16:24 +0000 |
---|---|---|
committer | bruening@chromium.org <bruening@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-17 02:16:24 +0000 |
commit | ef5c5f1b6e6966093120cfeae23cd0e3152a894b (patch) | |
tree | e36dea2db95dd7eb5f30608d3507bba572eeb63b | |
parent | edc1f447ca544d88418a565a125e515ab1c598d3 (diff) | |
download | chromium_src-ef5c5f1b6e6966093120cfeae23cd0e3152a894b.zip chromium_src-ef5c5f1b6e6966093120cfeae23cd0e3152a894b.tar.gz chromium_src-ef5c5f1b6e6966093120cfeae23cd0e3152a894b.tar.bz2 |
3 additions to common.gypi:
1) re-instate r113657 from crbug/106711:
win_release_OmitFramePointers=0 must explicitly pass /Oy-
since /O2 implies /Oy
2) add win_debug_OmitFramePointers as tri-state where blank
value (the default) avoids perturbing VS defaults
3) add win_release_extra_cflags and win_debug_extra_cflags
to make it easier to add custom local flags for
tool builds
BUG=106711
TEST=Tweaked these vars via GYP_DEFINES and include.gypi and confirmed the changes in build/All.vcproj
For example:
I have "'win_release_InlineFunctionExpansion': 0" in my include.gypi:
% GYP_DEFINES='win_debug_extra_cflags="/QIfist /nologo"' gclient runhooks
% grep -E -o 'Name="[^"|]*\|[^"]*"|Omit[^ ]*|include" AdditionalOptions="[^"]*"' build/All.vcproj
Name="Release|Win32"
include" AdditionalOptions="/MP /Ob0"
OmitFramePointers="true"
Name="Debug|Win32"
include" AdditionalOptions="/MP /QIfist /nologo"
Name="Release|x64"
include" AdditionalOptions="/MP /Ob0"
OmitFramePointers="true"
Name="Debug|x64"
include" AdditionalOptions="/MP /QIfist /nologo"
% GYP_DEFINES='win_release_extra_cflags="/QIfist /nologo" win_release_OmitFramePointers=0 win_debug_OmitFramePointers=1' gclient runhooks
% grep -E -o 'Name="[^"|]*\|[^"]*"|Omit[^ ]*|include" AdditionalOptions="[^"]*"' build/All.vcproj
Name="Release|Win32"
include" AdditionalOptions="/MP /QIfist /nologo /Ob0 /Oy-"
OmitFramePointers="false"
Name="Debug|Win32"
include" AdditionalOptions="/MP"
OmitFramePointers="true"
Name="Release|x64"
include" AdditionalOptions="/MP /QIfist /nologo /Ob0 /Oy-"
OmitFramePointers="false"
Name="Debug|x64"
include" AdditionalOptions="/MP"
OmitFramePointers="true"
Review URL: http://codereview.chromium.org/8966025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114893 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | build/common.gypi | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/build/common.gypi b/build/common.gypi index 5ce9eec..a37498f 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -927,7 +927,10 @@ 'win_debug_Optimization%': '0', # 0 = /Od # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx + # Tri-state: blank is default, 1 on, 0 off 'win_release_OmitFramePointers%': '1', + # Tri-state: blank is default, 1 on, 0 off + 'win_debug_OmitFramePointers%': '', # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off @@ -947,6 +950,10 @@ 'debug_extra_cflags%': '', 'release_valgrind_build%': 0, + # the non-qualified versions are widely assumed to be *nix-only + 'win_release_extra_cflags%': '', + 'win_debug_extra_cflags%': '', + # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)', @@ -1442,7 +1449,22 @@ ['win_debug_disable_iterator_debugging==1', { 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'], }], + + # if win_debug_OmitFramePointers is blank, leave as default + ['win_debug_OmitFramePointers==1', { + 'OmitFramePointers': 'true', + }], + ['win_debug_OmitFramePointers==0', { + 'OmitFramePointers': 'false', + # The above is not sufficient (http://crbug.com/106711): it + # simply eliminates an explicit "/Oy", but both /O2 and /Ox + # perform FPO regardless, so we must explicitly disable. + # We still want the false setting above to avoid having + # "/Oy /Oy-" and warnings about overriding. + 'AdditionalOptions': ['/Oy-'], + }], ], + 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ], }, 'VCLinkerTool': { 'LinkIncremental': '<(msvs_debug_link_incremental)', @@ -1501,13 +1523,21 @@ '<(win_release_InlineFunctionExpansion)', }], + # if win_release_OmitFramePointers is blank, leave as default ['win_release_OmitFramePointers==1', { 'OmitFramePointers': 'true', }], ['win_release_OmitFramePointers==0', { 'OmitFramePointers': 'false', + # The above is not sufficient (http://crbug.com/106711): it + # simply eliminates an explicit "/Oy", but both /O2 and /Ox + # perform FPO regardless, so we must explicitly disable. + # We still want the false setting above to avoid having + # "/Oy /Oy-" and warnings about overriding. + 'AdditionalOptions': ['/Oy-'], }], ], + 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ], }, 'VCLinkerTool': { # LinkIncremental is a tri-state boolean, where 0 means default |