summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorrkc@chromium.org <rkc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-08 00:00:44 +0000
committerrkc@chromium.org <rkc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-08 00:00:44 +0000
commitcf90a518555b24d7af6205ec264db297e104e53d (patch)
treec76d3539514fdaddc5e106a5e4236d85424c94ba /build
parent5a3925d795c6f1072b56ad20c675d3da6f6309ab (diff)
downloadchromium_src-cf90a518555b24d7af6205ec264db297e104e53d.zip
chromium_src-cf90a518555b24d7af6205ec264db297e104e53d.tar.gz
chromium_src-cf90a518555b24d7af6205ec264db297e104e53d.tar.bz2
Implement disable_pie for all executables.
On setting disable_pie=1 would only build Chrome with the PIE flag disabled. This helped debugging Chrome but browser_tests, ui_tests and other tests + executables were still built with PIE making remote debugging them not possible. Now when disable_pie=1 is specified, all executables will be built non-PIE. R=zelidrag@chromium.org,thakis@chromium.org BUG=None. TEST=Tested with a complete build. Only and all executables are being linked with '-nopie' with disable_pie=1 specified. Review URL: http://codereview.chromium.org/8207010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104609 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rw-r--r--build/common.gypi18
1 files changed, 18 insertions, 0 deletions
diff --git a/build/common.gypi b/build/common.gypi
index 9963f45..f3c8f13 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -388,6 +388,10 @@
# Whether to build for Wayland display server
'use_wayland%': 0,
+ # Default to enabled PIE; this is important for ASLR but we need to be
+ # able to turn it off for remote debugging on Chromium OS
+ 'linux_disable_pie%': 0,
+
# The release channel that this build targets. This is used to restrict
# channel-specific build options, like which installer packages to create.
# The default is 'all', which does no channel-specific filtering.
@@ -1754,6 +1758,20 @@
'-fPIC',
],
}],
+ # TODO(rkc): Currently building Chrome with the PIE flag causes
+ # remote debugging to break (remote debugger does not get correct
+ # section header offsets hence causing all symbol handling to go
+ # kaboom). See crosbug.com/15266
+ # Remove this flag once this issue is fixed.
+ ['linux_disable_pie==1', {
+ 'target_conditions': [
+ ['_type=="executable"', {
+ 'ldflags': [
+ '-nopie',
+ ],
+ }],
+ ],
+ }],
['sysroot!=""', {
'target_conditions': [
['_toolset=="target"', {