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: http://src.chromium.org/svn/trunk/src/build@114893 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
Родитель
4157c248d3
Коммит
1a015eacda
30
common.gypi
30
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
|
||||
|
|
Загрузка…
Ссылка в новой задаче