| OLD | NEW |
| 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 Loading... |
| 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" ] |
| 1249 } else { | 1253 } else { |
| 1250 cflags = [ "-O0" ] | 1254 cflags = [ "-O0" ] |
| 1251 ldflags = [] | 1255 ldflags = [] |
| 1252 } | 1256 } |
| 1253 } | 1257 } |
| 1254 | 1258 |
| 1255 # Turns up the optimization level. On Windows, this implies whole program | 1259 # Turns up the optimization level. On Windows, this implies whole program |
| 1256 # optimization and link-time code generation which is very expensive and should | 1260 # optimization and link-time code generation which is very expensive and should |
| 1257 # be used sparingly. | 1261 # be used sparingly. |
| 1258 config("optimize_max") { | 1262 config("optimize_max") { |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1396 | 1400 |
| 1397 if (is_ios || is_mac) { | 1401 if (is_ios || is_mac) { |
| 1398 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1402 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
| 1399 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1403 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
| 1400 config("enable_arc") { | 1404 config("enable_arc") { |
| 1401 common_flags = [ "-fobjc-arc" ] | 1405 common_flags = [ "-fobjc-arc" ] |
| 1402 cflags_objc = common_flags | 1406 cflags_objc = common_flags |
| 1403 cflags_objcc = common_flags | 1407 cflags_objcc = common_flags |
| 1404 } | 1408 } |
| 1405 } | 1409 } |
| OLD | NEW |