Add some more default build settings for Windows

This commit is contained in:
Adam Roben 2013-05-22 11:15:04 -04:00
parent 3cf6e5eda2
commit 35f4dfe4b0

View file

@ -6,6 +6,26 @@
'libchromiumcontent_resources_dir': '<(libchromiumcontent_library_dir)', 'libchromiumcontent_resources_dir': '<(libchromiumcontent_library_dir)',
'mac_deployment_target%': '10.8', 'mac_deployment_target%': '10.8',
'mac_sdkroot%': 'macosx', 'mac_sdkroot%': 'macosx',
'win_release_RuntimeLibrary%': '0', # /MT (nondebug static)
'win_debug_RuntimeLibrary%': '1', # /MTd (debug static)
# See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
'win_release_Optimization%': '2', # 2 = /Os
'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%': '0',
# 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
# See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
}, },
'target_defaults': { 'target_defaults': {
'defines': [ 'defines': [
@ -43,6 +63,41 @@
'inherit_from': [ 'inherit_from': [
'Common_Base', 'Common_Base',
], ],
'msvs_settings': {
'VCCLCompilerTool': {
'Optimization': '<(win_debug_Optimization)',
'PreprocessorDefinitions': ['_DEBUG'],
'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
# We use Release to match the version of chromiumcontent.dll we
# link against.
'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
'conditions': [
# According to MSVS, InlineFunctionExpansion=0 means
# "default inlining", not "/Ob0".
# Thus, we have to handle InlineFunctionExpansion==0 separately.
['win_debug_InlineFunctionExpansion==0', {
'AdditionalOptions': ['/Ob0'],
}],
['win_debug_InlineFunctionExpansion!=""', {
'InlineFunctionExpansion':
'<(win_debug_InlineFunctionExpansion)',
}],
# 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-'],
}],
],
},
},
'xcode_settings': { 'xcode_settings': {
'COPY_PHASE_STRIP': 'NO', 'COPY_PHASE_STRIP': 'NO',
'GCC_OPTIMIZATION_LEVEL': '0', 'GCC_OPTIMIZATION_LEVEL': '0',
@ -52,6 +107,37 @@
'inherit_from': [ 'inherit_from': [
'Common_Base', 'Common_Base',
], ],
'msvs_settings': {
'VCCLCompilerTool': {
'Optimization': '<(win_release_Optimization)',
'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
'conditions': [
# According to MSVS, InlineFunctionExpansion=0 means
# "default inlining", not "/Ob0".
# Thus, we have to handle InlineFunctionExpansion==0 separately.
['win_release_InlineFunctionExpansion==0', {
'AdditionalOptions': ['/Ob0'],
}],
['win_release_InlineFunctionExpansion!=""', {
'InlineFunctionExpansion':
'<(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-'],
}],
],
},
},
}, },
}, },
}, },