summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2015-09-17 18:14:35 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-18 01:15:56 +0000
commita7b7aab6f62caf1873183afcc4eb59c6812e06b5 (patch)
tree21259f34b07a7a5ae2a505386a04b004ba1428b5 /build
parentd35dca1768aa8bf44af0e3318664f224fd88acf4 (diff)
downloadchromium_src-a7b7aab6f62caf1873183afcc4eb59c6812e06b5.zip
chromium_src-a7b7aab6f62caf1873183afcc4eb59c6812e06b5.tar.gz
chromium_src-a7b7aab6f62caf1873183afcc4eb59c6812e06b5.tar.bz2
Turn on -fstack-protector-strong for Clang.
Review URL: https://codereview.chromium.org/1352073002 Cr-Commit-Position: refs/heads/master@{#349569}
Diffstat (limited to 'build')
-rw-r--r--build/common.gypi16
1 files changed, 13 insertions, 3 deletions
diff --git a/build/common.gypi b/build/common.gypi
index 78e8eff..11e81a3 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -3679,13 +3679,23 @@
# Chrome OS enables -fstack-protector-strong via its build wrapper,
# and we want to avoid overriding this, so stack-protector is only
# enabled when not building on Chrome OS.
- # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc
- # supports it.
'target_defaults': {
'cflags': [
- '-fstack-protector',
'--param=ssp-buffer-size=4',
],
+ 'conditions': [
+ ['clang==1', {
+ 'cflags': [
+ '-fstack-protector-strong',
+ ],
+ }, {
+ # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc
+ # supports it.
+ 'cflags': [
+ '-fstack-protector',
+ ],
+ }],
+ ],
},
}],
['os_posix==1 and OS=="linux"', {