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/arm.gni") |
7 import("//build/config/chrome_build.gni") | 7 import("//build/config/chrome_build.gni") |
8 import("//build/config/chromecast_build.gni") | 8 import("//build/config/chromecast_build.gni") |
9 import("//build/config/compiler/pgo/pgo.gni") | 9 import("//build/config/compiler/pgo/pgo.gni") |
10 import("//build/config/sanitizers/sanitizers.gni") | 10 import("//build/config/sanitizers/sanitizers.gni") |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
79 } else { | 79 } else { |
80 # Explicitly ask for frame pointers, otherwise: | 80 # Explicitly ask for frame pointers, otherwise: |
81 # * Stacks may be missing for sanitizer and profiling builds. | 81 # * Stacks may be missing for sanitizer and profiling builds. |
82 # * Debug tcmalloc can crash (crbug.com/636489). | 82 # * Debug tcmalloc can crash (crbug.com/636489). |
83 # * Stacks may be missing for arm64 crash dumps (crbug.com/391706). | 83 # * Stacks may be missing for arm64 crash dumps (crbug.com/391706). |
84 enabled_frame_pointers = | 84 enabled_frame_pointers = |
85 using_sanitizer || enable_profiling || is_debug || current_cpu == "arm64" | 85 using_sanitizer || enable_profiling || is_debug || current_cpu == "arm64" |
86 } | 86 } |
87 | 87 |
88 # Unwinding with frame pointers requires that frame pointers are enabled by | 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 | 89 # default for most translation units, that they are emitted correctly, and that |
90 # frame pointers are not correctly emitted for thumb. | 90 # the compiler or platform provides a way to access them. |
91 if (enabled_frame_pointers && !(current_cpu == "arm" && arm_use_thumb)) { | 91 if (current_cpu == "arm" && arm_use_thumb) { |
92 can_unwind_with_frame_pointers = true | 92 # ARM Thumb builds do not emit frame pointers correctly. |
93 can_unwind_with_frame_pointers = false | |
94 } else if (is_win) { | |
95 # Windows 32-bit does provide frame pointers, but the compiler does not provid e | |
brettw
2017/04/10 18:29:35
80 cols?
Wez
2017/04/10 18:49:10
Seriously, gn format, you only had to do the one t
| |
96 # intrinsics to access them, so we don't use them. | |
97 can_unwind_with_frame_pointers = false | |
93 } else { | 98 } else { |
94 can_unwind_with_frame_pointers = false | 99 can_unwind_with_frame_pointers = enabled_frame_pointers |
95 } | 100 } |
96 | 101 |
97 declare_args() { | 102 declare_args() { |
98 # Whether or not the official builds should be built with full WPO. Enabled by | 103 # Whether or not the official builds should be built with full WPO. Enabled by |
99 # default for the PGO and the x64 builds. | 104 # default for the PGO and the x64 builds. |
100 if (chrome_pgo_phase > 0) { | 105 if (chrome_pgo_phase > 0) { |
101 full_wpo_on_official = true | 106 full_wpo_on_official = true |
102 } else { | 107 } else { |
103 full_wpo_on_official = false | 108 full_wpo_on_official = false |
104 } | 109 } |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
156 } | 161 } |
157 | 162 |
158 # Assert that the configuration isn't going to hit https://crbug.com/648948. | 163 # Assert that the configuration isn't going to hit https://crbug.com/648948. |
159 assert(ignore_elf32_limitations || !is_android || | 164 assert(ignore_elf32_limitations || !is_android || |
160 (android_64bit_target_cpu && !build_apk_secondary_abi) || | 165 (android_64bit_target_cpu && !build_apk_secondary_abi) || |
161 is_component_build || symbol_level < 2, | 166 is_component_build || symbol_level < 2, |
162 "Android 32-bit non-component builds cannot have symbol_level=2 " + | 167 "Android 32-bit non-component builds cannot have symbol_level=2 " + |
163 "due to 4GiB file size limit, see https://crbug.com/648948. " + | 168 "due to 4GiB file size limit, see https://crbug.com/648948. " + |
164 "If you really want to try this out, " + | 169 "If you really want to try this out, " + |
165 "set ignore_elf32_limitations=true.") | 170 "set ignore_elf32_limitations=true.") |
OLD | NEW |