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

Side by Side Diff: build/config/compiler/BUILD.gn

Issue 2029633002: mac: Use -fstack-protector-strong instead of -fstack-protector-all. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « build/common.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/android/config.gni") 5 import("//build/config/android/config.gni")
6 import("//build/config/chrome_build.gni") 6 import("//build/config/chrome_build.gni")
7 import("//build/config/compiler/compiler.gni") 7 import("//build/config/compiler/compiler.gni")
8 import("//build/config/nacl/config.gni") 8 import("//build/config/nacl/config.gni")
9 import("//build/toolchain/cc_wrapper.gni") 9 import("//build/toolchain/cc_wrapper.gni")
10 import("//build/toolchain/toolchain.gni") 10 import("//build/toolchain/toolchain.gni")
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 "-fno-threadsafe-statics", 184 "-fno-threadsafe-statics",
185 185
186 # Not exporting C++ inline functions can generally be applied anywhere 186 # Not exporting C++ inline functions can generally be applied anywhere
187 # so we do so here. Normal function visibility is controlled by 187 # so we do so here. Normal function visibility is controlled by
188 # //build/config/gcc:symbol_visibility_hidden. 188 # //build/config/gcc:symbol_visibility_hidden.
189 "-fvisibility-inlines-hidden", 189 "-fvisibility-inlines-hidden",
190 ] 190 ]
191 191
192 # Stack protection. 192 # Stack protection.
193 if (is_mac) { 193 if (is_mac) {
194 cflags += [ "-fstack-protector-all" ] 194 cflags += [ "-fstack-protector-strong" ]
195 } else if (is_posix && !is_chromeos && !is_nacl) { 195 } else if (is_posix && !is_chromeos && !is_nacl) {
196 # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc supports it. 196 # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc supports it.
197 # See also https://crbug.com/533294
197 cflags += [ "--param=ssp-buffer-size=4" ] 198 cflags += [ "--param=ssp-buffer-size=4" ]
198 199
199 # The x86 toolchain currently has problems with stack-protector. 200 # The x86 toolchain currently has problems with stack-protector.
200 if (is_android && current_cpu == "x86") { 201 if (is_android && current_cpu == "x86") {
201 cflags += [ "-fno-stack-protector" ] 202 cflags += [ "-fno-stack-protector" ]
202 } else { 203 } else {
203 cflags += [ "-fstack-protector" ] 204 cflags += [ "-fstack-protector" ]
204 } 205 }
205 } 206 }
206 207
(...skipping 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1463 1464
1464 if (is_ios || is_mac) { 1465 if (is_ios || is_mac) {
1465 # On Mac and iOS, this enables support for ARC (automatic ref-counting). 1466 # On Mac and iOS, this enables support for ARC (automatic ref-counting).
1466 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. 1467 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
1467 config("enable_arc") { 1468 config("enable_arc") {
1468 common_flags = [ "-fobjc-arc" ] 1469 common_flags = [ "-fobjc-arc" ]
1469 cflags_objc = common_flags 1470 cflags_objc = common_flags
1470 cflags_objcc = common_flags 1471 cflags_objcc = common_flags
1471 } 1472 }
1472 } 1473 }
OLDNEW
« no previous file with comments | « build/common.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698