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

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

Issue 1664693004: GN: Set -fstack-protector for arm64 to match GYP (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | 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/ccache.gni") 9 import("//build/toolchain/ccache.gni")
10 10
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 # //build/config/gcc:symbol_visibility_hidden. 156 # //build/config/gcc:symbol_visibility_hidden.
157 "-fvisibility-inlines-hidden", 157 "-fvisibility-inlines-hidden",
158 ] 158 ]
159 159
160 # Stack protection. 160 # Stack protection.
161 if (is_mac) { 161 if (is_mac) {
162 cflags += [ "-fstack-protector-all" ] 162 cflags += [ "-fstack-protector-all" ]
163 } else if (is_posix && !is_chromeos && !is_nacl) { 163 } else if (is_posix && !is_chromeos && !is_nacl) {
164 # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc supports it. 164 # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc supports it.
165 cflags += [ "--param=ssp-buffer-size=4" ] 165 cflags += [ "--param=ssp-buffer-size=4" ]
166 if (is_android && (current_cpu == "arm64" || current_cpu == "x86")) { 166
167 # The x86 toolchain currently has problems with stack-protector.
168 if (is_android && current_cpu == "x86") {
167 cflags += [ "-fno-stack-protector" ] 169 cflags += [ "-fno-stack-protector" ]
168 } else { 170 } else {
169 cflags += [ "-fstack-protector" ] 171 cflags += [ "-fstack-protector" ]
170 } 172 }
171 } 173 }
172 174
173 # Linker warnings. 175 # Linker warnings.
174 if (!(is_chromeos && current_cpu == "arm") && 176 if (!(is_chromeos && current_cpu == "arm") &&
175 !(is_android && use_order_profiling) && !is_mac && !is_ios) { 177 !(is_android && use_order_profiling) && !is_mac && !is_ios) {
176 # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 178 # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580
(...skipping 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after
1311 if (symbol_level == 0) { 1313 if (symbol_level == 0) {
1312 configs = [ ":no_symbols" ] 1314 configs = [ ":no_symbols" ]
1313 } else if (symbol_level == 1) { 1315 } else if (symbol_level == 1) {
1314 configs = [ ":minimal_symbols" ] 1316 configs = [ ":minimal_symbols" ]
1315 } else if (symbol_level == 2) { 1317 } else if (symbol_level == 2) {
1316 configs = [ ":symbols" ] 1318 configs = [ ":symbols" ]
1317 } else { 1319 } else {
1318 assert(false) 1320 assert(false)
1319 } 1321 }
1320 } 1322 }
OLDNEW
« 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