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

Unified Diff: build/common.gypi

Issue 11490019: Only build with _FORTIFY_SOURCE in Release mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 3c4547ce0d2b718ed8c7b8c15b6d56a408910391..7363444fd93800d040bf4232abbfbbcac4b03619 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -2266,6 +2266,15 @@
['win_use_allocator_shim==0', {
'defines': ['NO_TCMALLOC'],
}],
+ ['os_posix==1 and chromium_code==1', {
+ # Non-chromium code is not guaranteed to compile cleanly
+ # with _FORTIFY_SOURCE. Also, fortified build may fail
+ # when optimizations are disabled, so only do that for Release
+ # build.
+ 'defines': [
+ '_FORTIFY_SOURCE=2',
+ ],
+ }],
['OS=="linux" or OS=="android"', {
'target_conditions': [
['_toolset=="target"', {
@@ -2312,15 +2321,6 @@
'-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"', {
« 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