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/chromecast_build.gni") | 7 import("//build/config/chromecast_build.gni") |
8 import("//build/config/compiler/compiler.gni") | 8 import("//build/config/compiler/compiler.gni") |
9 import("//build/config/nacl/config.gni") | 9 import("//build/config/nacl/config.gni") |
10 import("//build/toolchain/cc_wrapper.gni") | 10 import("//build/toolchain/cc_wrapper.gni") |
(...skipping 1367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1378 "-Wl,--gc-sections", | 1378 "-Wl,--gc-sections", |
1379 ] | 1379 ] |
1380 } | 1380 } |
1381 } | 1381 } |
1382 | 1382 |
1383 config("default_stack_frames") { | 1383 config("default_stack_frames") { |
1384 if (is_posix) { | 1384 if (is_posix) { |
1385 if (enabled_frame_pointers) { | 1385 if (enabled_frame_pointers) { |
1386 cflags = [ "-fno-omit-frame-pointer" ] | 1386 cflags = [ "-fno-omit-frame-pointer" ] |
1387 } else { | 1387 } else { |
1388 cflags = [ "-fomit-frame-pointer" ] | 1388 if (is_android || current_cpu != "arm") { |
| 1389 # TODO(710131): Remove this special-casing for ARM 32 bit once we |
| 1390 # have determined why -fomit-frame-pointer triggers CPU errata in |
| 1391 # ARM A12/A17 devices. |
| 1392 cflags = [ "-fomit-frame-pointer" ] |
| 1393 } |
1389 } | 1394 } |
1390 } | 1395 } |
1391 # On Windows, the flag to enable framepointers "/Oy-" must always come after | 1396 # On Windows, the flag to enable framepointers "/Oy-" must always come after |
1392 # the optimization flag [e.g. "/O2"]. The optimization flag is set by one of | 1397 # the optimization flag [e.g. "/O2"]. The optimization flag is set by one of |
1393 # the "optimize" configs, see rest of this file. The ordering that cflags are | 1398 # the "optimize" configs, see rest of this file. The ordering that cflags are |
1394 # applied is well-defined by the GN spec, and there is no way to ensure that | 1399 # applied is well-defined by the GN spec, and there is no way to ensure that |
1395 # cflags set by "default_stack_frames" is applied after those set by an | 1400 # cflags set by "default_stack_frames" is applied after those set by an |
1396 # "optimize" config. Similarly, there is no way to propagate state from this | 1401 # "optimize" config. Similarly, there is no way to propagate state from this |
1397 # config into the "optimize" config. We always apply the "/Oy-" config in the | 1402 # config into the "optimize" config. We always apply the "/Oy-" config in the |
1398 # definition for common_optimize_on_cflags definition, even though this may | 1403 # definition for common_optimize_on_cflags definition, even though this may |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1717 | 1722 |
1718 if (is_ios || is_mac) { | 1723 if (is_ios || is_mac) { |
1719 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1724 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
1720 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1725 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
1721 config("enable_arc") { | 1726 config("enable_arc") { |
1722 common_flags = [ "-fobjc-arc" ] | 1727 common_flags = [ "-fobjc-arc" ] |
1723 cflags_objc = common_flags | 1728 cflags_objc = common_flags |
1724 cflags_objcc = common_flags | 1729 cflags_objcc = common_flags |
1725 } | 1730 } |
1726 } | 1731 } |
OLD | NEW |