OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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/arm.gni") |
6 import("//build/config/chrome_build.gni") | 7 import("//build/config/chrome_build.gni") |
7 import("//build/config/chromecast_build.gni") | 8 import("//build/config/chromecast_build.gni") |
8 import("//build/config/compiler/pgo/pgo.gni") | 9 import("//build/config/compiler/pgo/pgo.gni") |
9 import("//build/config/sanitizers/sanitizers.gni") | 10 import("//build/config/sanitizers/sanitizers.gni") |
10 import("//build/toolchain/goma.gni") | 11 import("//build/toolchain/goma.gni") |
11 import("//build/toolchain/toolchain.gni") | 12 import("//build/toolchain/toolchain.gni") |
12 import("//build_overrides/build.gni") | 13 import("//build_overrides/build.gni") |
13 | 14 |
14 declare_args() { | 15 declare_args() { |
15 # How many symbols to include in the build. This affects the performance of | 16 # How many symbols to include in the build. This affects the performance of |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 # Note that doing a link repro uses a lot of disk space and slows down the | 59 # Note that doing a link repro uses a lot of disk space and slows down the |
59 # build, so this shouldn't be enabled on too many targets. | 60 # build, so this shouldn't be enabled on too many targets. |
60 # | 61 # |
61 # See crbug.com/669854. | 62 # See crbug.com/669854. |
62 linkrepro_root_dir = "" | 63 linkrepro_root_dir = "" |
63 | 64 |
64 # Whether or not we should use position independent code. | 65 # Whether or not we should use position independent code. |
65 use_pic = true | 66 use_pic = true |
66 } | 67 } |
67 | 68 |
| 69 # Whether to emit frame pointers by default. |
| 70 if (is_mac || is_ios) { |
| 71 enabled_frame_pointers = true |
| 72 } else if (is_win) { |
| 73 # 64-bit Windows ABI doesn't support frame pointers. |
| 74 if (target_cpu == "x64") { |
| 75 enabled_frame_pointers = false |
| 76 } else { |
| 77 enabled_frame_pointers = true |
| 78 } |
| 79 } else { |
| 80 # Explicitly ask for frame pointers, otherwise: |
| 81 # * Stacks may be missing for sanitizer and profiling builds. |
| 82 # * Debug tcmalloc can crash (crbug.com/636489). |
| 83 # * Stacks may be missing for arm64 crash dumps (crbug.com/391706). |
| 84 enabled_frame_pointers = |
| 85 using_sanitizer || enable_profiling || is_debug || current_cpu == "arm64" |
| 86 } |
| 87 |
| 88 # Unwinding with frame pointers requires that frame pointers are enabled by |
| 89 # default for most translation units, and that the architecture isn't thumb, as |
| 90 # frame pointers are not correctly emitted for thumb. |
| 91 if (enabled_frame_pointers && !(current_cpu == "arm" && arm_use_thumb)) { |
| 92 can_unwind_with_frame_pointers = true |
| 93 } else { |
| 94 can_unwind_with_frame_pointers = false |
| 95 } |
| 96 |
68 declare_args() { | 97 declare_args() { |
69 # Whether or not the official builds should be built with full WPO. Enabled by | 98 # Whether or not the official builds should be built with full WPO. Enabled by |
70 # default for the PGO and the x64 builds. | 99 # default for the PGO and the x64 builds. |
71 if (chrome_pgo_phase > 0) { | 100 if (chrome_pgo_phase > 0) { |
72 full_wpo_on_official = true | 101 full_wpo_on_official = true |
73 } else { | 102 } else { |
74 full_wpo_on_official = false | 103 full_wpo_on_official = false |
75 } | 104 } |
76 } | 105 } |
77 | 106 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 } | 156 } |
128 | 157 |
129 # Assert that the configuration isn't going to hit https://crbug.com/648948. | 158 # Assert that the configuration isn't going to hit https://crbug.com/648948. |
130 assert(ignore_elf32_limitations || !is_android || | 159 assert(ignore_elf32_limitations || !is_android || |
131 (android_64bit_target_cpu && !build_apk_secondary_abi) || | 160 (android_64bit_target_cpu && !build_apk_secondary_abi) || |
132 is_component_build || symbol_level < 2, | 161 is_component_build || symbol_level < 2, |
133 "Android 32-bit non-component builds cannot have symbol_level=2 " + | 162 "Android 32-bit non-component builds cannot have symbol_level=2 " + |
134 "due to 4GiB file size limit, see https://crbug.com/648948. " + | 163 "due to 4GiB file size limit, see https://crbug.com/648948. " + |
135 "If you really want to try this out, " + | 164 "If you really want to try this out, " + |
136 "set ignore_elf32_limitations=true.") | 165 "set ignore_elf32_limitations=true.") |
OLD | NEW |