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

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

Issue 2642283003: GN: Only use -fPIC where needed (Closed)
Patch Set: Also on Android Created 3 years, 11 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 | runtime/bin/BUILD.gn » ('j') | 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 if (current_cpu == "arm") { 6 if (current_cpu == "arm") {
7 import("//build/config/arm.gni") 7 import("//build/config/arm.gni")
8 } 8 }
9 if (current_cpu == "mipsel" || current_cpu == "mips64el") { 9 if (current_cpu == "mipsel" || current_cpu == "mips64el") {
10 import("//build/config/mips.gni") 10 import("//build/config/mips.gni")
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 } 285 }
286 286
287 if (current_cpu != "mipsel") { 287 if (current_cpu != "mipsel") {
288 cflags += [ "-fno-exceptions" ] 288 cflags += [ "-fno-exceptions" ]
289 } 289 }
290 } 290 }
291 291
292 # Linux/Android common flags setup. 292 # Linux/Android common flags setup.
293 # --------------------------------- 293 # ---------------------------------
294 if (is_linux || is_android) { 294 if (is_linux || is_android) {
295 cflags += [ "-fPIC" ]
296
297 ldflags += [ 295 ldflags += [
298 "-fPIC",
299 "-Wl,-z,noexecstack", 296 "-Wl,-z,noexecstack",
300 "-Wl,-z,now", 297 "-Wl,-z,now",
301 "-Wl,-z,relro", 298 "-Wl,-z,relro",
302 ] 299 ]
303 } 300 }
304 301
305 # Linux-specific compiler flags setup. 302 # Linux-specific compiler flags setup.
306 # ------------------------------------ 303 # ------------------------------------
307 if (is_linux) { 304 if (is_linux) {
308 cflags += [ "-pthread" ] 305 cflags += [ "-pthread" ]
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 cflags = [ "/Zi" ] # Produce PDB file, no edit and continue. 760 cflags = [ "/Zi" ] # Produce PDB file, no edit and continue.
764 } 761 }
765 ldflags = [ "/DEBUG" ] 762 ldflags = [ "/DEBUG" ]
766 } else { 763 } else {
767 cflags = [ 764 cflags = [
768 "-g3", 765 "-g3",
769 "-ggdb3", 766 "-ggdb3",
770 ] 767 ]
771 } 768 }
772 } 769 }
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698