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

Unified Diff: build/common.gypi

Issue 11411022: Use more hardening flags: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: --param=ssp-buffer-size=4 Created 8 years, 1 month 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 | no next file » | 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 72406fcde00903e2006b1f533e1caefab5f14586..9ec8c517030ac6d84a359646044be8347121b115 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -2253,6 +2253,29 @@
},
},
'conditions': [
+ ['os_posix==1', {
+ 'target_defaults': {
+ 'cflags': [
+ # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc
+ # supports it.
+ '-fstack-protector',
+ '--param=ssp-buffer-size=4',
+ ],
+ 'ldflags': [
+ '-Wl,-z,now',
+ '-Wl,-z,relro',
+ ],
+ 'conditions': [
+ ['chromium_code==1', {
+ # Non-chromium code is not guaranteed to compile cleanly
+ # with _FORTIFY_SOURCE.
+ 'defines': [
+ '_FORTIFY_SOURCE=2',
+ ],
+ }],
+ ],
+ },
+ }],
['os_posix==1 and OS!="mac" and OS!="ios"', {
'target_defaults': {
# Enable -Werror by default, but put it in a variable so it can
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698