diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-08 15:33:17 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-08 15:33:17 +0000 |
commit | 162407f17390cdd987779f4cdc808addaa7800a4 (patch) | |
tree | 749c921845f5e62aac3a814266142fe48fc3bcab /build | |
parent | a8f2115c89679dea905482d9c189c1df78cfd26f (diff) | |
download | chromium_src-162407f17390cdd987779f4cdc808addaa7800a4.zip chromium_src-162407f17390cdd987779f4cdc808addaa7800a4.tar.gz chromium_src-162407f17390cdd987779f4cdc808addaa7800a4.tar.bz2 |
Disable PIE for dump_syms. The framework is too big to reliably be able to
mmap it in a 32-bit process with PIE on. There may not be a big enough gap in
the address space to mmap it.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7840040
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100149 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rw-r--r-- | build/common.gypi | 50 |
1 files changed, 27 insertions, 23 deletions
diff --git a/build/common.gypi b/build/common.gypi index 0a8d7ba..bebff1a 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -1622,11 +1622,12 @@ ['OS=="mac"', { 'target_defaults': { 'variables': { - # These should be 'mac_real_dsym%' and 'mac_strip%', but there - # seems to be a bug with % in variables that are intended to be - # set to different values in different targets, like these two. - 'mac_strip': 1, # Strip debugging symbols from the target. + # These should end with %, but there seems to be a bug with % in + # variables that are intended to be set to different values in + # different targets, like these. + 'mac_pie': 1, # Most executables can be position-independent. 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases. + 'mac_strip': 1, # Strip debugging symbols from the target. }, 'mac_bundle': 0, 'xcode_settings': { @@ -1725,15 +1726,16 @@ # relativization during dict merging. 'change_mach_o_flags_path': 'mac/change_mach_o_flags_from_xcode.sh', - 'change_mach_o_flags_options': [ + 'change_mach_o_flags_options%': [ ], 'target_conditions': [ - ['release_valgrind_build==1', { + ['mac_pie==0 or release_valgrind_build==1', { + # Don't enable PIE if it's unwanted. It's unwanted if + # the target specifies mac_pie=0 or if building for + # Valgrind, because Valgrind doesn't understand slide. + # See the similar mac_pie/release_valgrind_build check + # below. 'change_mach_o_flags_options': [ - # Turn off PIE when building for Valgrind because - # Valgrind doesn't understand slide. TODO: Make - # Valgrind on Mac OS X understand slide, and get rid - # of the Valgrind check. '--no-pie', ], }], @@ -1756,19 +1758,21 @@ }, }], ], - }], - ['_type=="executable" and release_valgrind_build==0', { - # Turn on position-independence (ASLR) for executables. When PIE - # is on for the Chrome executables, the framework will also be - # subject to ASLR. - # Don't do this when building for Valgrind because Valgrind - # doesn't understand slide. TODO: Make Valgrind on Mac OS X - # understand slide, and get rid of the Valgrind check. - 'xcode_settings': { - 'OTHER_LDFLAGS': [ - '-Wl,-pie', # Position-independent executable (MH_PIE) - ], - }, + 'target_conditions': [ + ['mac_pie==1 and release_valgrind_build==0', { + # Turn on position-independence (ASLR) for executables. When + # PIE is on for the Chrome executables, the framework will + # also be subject to ASLR. + # Don't do this when building for Valgrind, because Valgrind + # doesn't understand slide. TODO: Make Valgrind on Mac OS X + # understand slide, and get rid of the Valgrind check. + 'xcode_settings': { + 'OTHER_LDFLAGS': [ + '-Wl,-pie', # Position-independent executable (MH_PIE) + ], + }, + }], + ], }], ['(_type=="executable" or _type=="shared_library" or \ _type=="loadable_module") and mac_strip!=0', { |