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

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

Issue 1883723004: Android: Avoid linking with --gc-sections. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: back to patch set 3 Created 4 years, 8 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') | build/config/sanitizers/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 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 1228 matching lines...) Expand 10 before | Expand all | Expand 10 after
1239 "-fdata-sections", 1239 "-fdata-sections",
1240 "-ffunction-sections", 1240 "-ffunction-sections",
1241 ] 1241 ]
1242 1242
1243 # We don't omit frame pointers on arm64 since they are required 1243 # We don't omit frame pointers on arm64 since they are required
1244 # to correctly unwind stackframes which contain system library 1244 # to correctly unwind stackframes which contain system library
1245 # function frames (crbug.com/391706). 1245 # function frames (crbug.com/391706).
1246 if (!using_sanitizer && target_cpu != "arm64") { 1246 if (!using_sanitizer && target_cpu != "arm64") {
1247 cflags += [ "-fomit-frame-pointer" ] 1247 cflags += [ "-fomit-frame-pointer" ]
1248 } 1248 }
1249
1250 # Don't use gc-sections since it can cause links to succeed when they
1251 # actually shouldn't. http://crbug.com/159847
1252 ldflags = common_optimize_on_ldflags - [ "-Wl,--gc-sections" ]
1253 } else { 1249 } else {
1254 cflags = [ "-O0" ] 1250 cflags = [ "-O0" ]
1255 ldflags = [] 1251 ldflags = []
1256 } 1252 }
1257 } 1253 }
1258 1254
1259 # Turns up the optimization level. On Windows, this implies whole program 1255 # Turns up the optimization level. On Windows, this implies whole program
1260 # optimization and link-time code generation which is very expensive and should 1256 # optimization and link-time code generation which is very expensive and should
1261 # be used sparingly. 1257 # be used sparingly.
1262 config("optimize_max") { 1258 config("optimize_max") {
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1400 1396
1401 if (is_ios || is_mac) { 1397 if (is_ios || is_mac) {
1402 # On Mac and iOS, this enables support for ARC (automatic ref-counting). 1398 # On Mac and iOS, this enables support for ARC (automatic ref-counting).
1403 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. 1399 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
1404 config("enable_arc") { 1400 config("enable_arc") {
1405 common_flags = [ "-fobjc-arc" ] 1401 common_flags = [ "-fobjc-arc" ]
1406 cflags_objc = common_flags 1402 cflags_objc = common_flags
1407 cflags_objcc = common_flags 1403 cflags_objcc = common_flags
1408 } 1404 }
1409 } 1405 }
OLDNEW
« no previous file with comments | « build/common.gypi ('k') | build/config/sanitizers/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698