Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2289)

Unified Diff: build/common.gypi

Issue 8207010: Implement disable_pie for all executables. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comments incorporated. Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/chrome_exe.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/common.gypi
diff --git a/build/common.gypi b/build/common.gypi
index 9963f45adc6a35d42de45243423560146fb14703..f3c8f13ca1dc4eec1f17d889fdaed08b64d6dc7e 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"', {
« no previous file with comments | « no previous file | chrome/chrome_exe.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698