summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-13 02:43:33 +0000
committerwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-13 02:43:33 +0000
commit7cf23ce6e4afb63a05aa68042e84cbdc7d0be165 (patch)
treeb8d86d58ad7a99499089889e7660890628b79817
parentc5e9c6ce5aad49a14fc197cf09b813754d52d322 (diff)
downloadchromium_src-7cf23ce6e4afb63a05aa68042e84cbdc7d0be165.zip
chromium_src-7cf23ce6e4afb63a05aa68042e84cbdc7d0be165.tar.gz
chromium_src-7cf23ce6e4afb63a05aa68042e84cbdc7d0be165.tar.bz2
Revert 117533 - Fix ASLR Windows build configuration
1) Actually turn off ASLR for Debug build. Despite the comments, this was not happening in reality because the /dynamicbase linker flag overrode the VCLinkerTool.RandomizedBaseAddress setting. 2) Make the ASLR setting configurable from outside (target usage is for particular Dr. Memory builds). TEST=Built googleurl_unittests and ensured its ALSR setting matched that requested, both for default and for custom via new gyp var BUG=109767 Review URL: http://codereview.chromium.org/9169020 TBR=bruening@chromium.org Review URL: http://codereview.chromium.org/9194003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117586 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--build/common.gypi59
1 files changed, 12 insertions, 47 deletions
diff --git a/build/common.gypi b/build/common.gypi
index 2f58269..9c1d9db 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -965,7 +965,7 @@
# 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,
+ 'win_release_OmitFramePointers%': '1',
# Tri-state: blank is default, 1 on, 0 off
'win_debug_OmitFramePointers%': '',
@@ -983,11 +983,6 @@
# See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
'win_debug_disable_iterator_debugging%': '0',
- # Tri-state: blank is VS default, 1 on, 0 off
- 'win_release_RandomizedBaseAddress%': '',
- # Tri-state: blank is VS default, 1 on, 0 off. Off by default: see below.
- 'win_debug_RandomizedBaseAddress%': 0,
-
'release_extra_cflags%': '',
'debug_extra_cflags%': '',
'release_valgrind_build%': 0,
@@ -1522,32 +1517,15 @@
},
'VCLinkerTool': {
'LinkIncremental': '<(msvs_debug_link_incremental)',
- 'conditions': [
- # ASLR makes debugging with windbg difficult because Chrome.exe
- # and Chrome.dll share the same base name. As result, windbg will
- # name the Chrome.dll module like chrome_<base address>, where
- # <base address> typically changes with each launch. This in turn
- # means that breakpoints in Chrome.dll don't stick from one launch
- # to the next. For this reason, we turn ASLR off in debug builds.
- # Note that this is a three-way bool, where 0 means to pick up
- # the default setting, 1 is off and 2 is on.
- # Also note that an explicit /dynamicbase linker flag will
- # override this setting.
-
- # If win_debug_RandomizedBaseAddress is blank, leave as default
- # (that's VS default: off for VS2008, on for VS2010).
- ['win_debug_RandomizedBaseAddress==1', {
- # No ASLR for executables or static libraries
- 'target_conditions': [
- ['_type=="shared_library" or _type=="loadable_module"', {
- 'RandomizedBaseAddress': 2,
- }],
- ],
- }],
- ['win_debug_RandomizedBaseAddress==0', {
- 'RandomizedBaseAddress': 1,
- }],
- ],
+ # ASLR makes debugging with windbg difficult because Chrome.exe and
+ # Chrome.dll share the same base name. As result, windbg will
+ # name the Chrome.dll module like chrome_<base address>, where
+ # <base address> typically changes with each launch. This in turn
+ # means that breakpoints in Chrome.dll don't stick from one launch
+ # to the next. For this reason, we turn ASLR off in debug builds.
+ # Note that this is a three-way bool, where 0 means to pick up
+ # the default setting, 1 is off and 2 is on.
+ 'RandomizedBaseAddress': 1,
},
'VCResourceCompilerTool': {
'PreprocessorDefinitions': ['_DEBUG'],
@@ -1626,21 +1604,6 @@
# information is used by the Syzygy optimization tool when
# decomposing the release image.
'Profile': 'true',
- 'conditions': [
- # If win_release_RandomizedBaseAddress is blank, leave as default.
- # For RandomizedBaseAddress: 0=default, 1=off, 2=on
- ['win_release_RandomizedBaseAddress==1', {
- # No ASLR for executables or static libraries
- 'target_conditions': [
- ['_type=="shared_library" or _type=="loadable_module"', {
- 'RandomizedBaseAddress': 2,
- }],
- ],
- }],
- ['win_release_RandomizedBaseAddress==0', {
- 'RandomizedBaseAddress': 1,
- }],
- ],
},
},
'conditions': [
@@ -2782,6 +2745,7 @@
'VCLinkerTool': {
'AdditionalOptions': [
'/safeseh',
+ '/dynamicbase',
'/ignore:4199',
'/ignore:4221',
'/nxcompat',
@@ -2794,6 +2758,7 @@
'VCLinkerTool': {
'AdditionalOptions': [
# safeseh is not compatible with x64
+ '/dynamicbase',
'/ignore:4199',
'/ignore:4221',
'/nxcompat',