Chromium Code Reviews| Index: build/config/compiler/BUILD.gn |
| diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn |
| index 79723f6cc76c041697955f5c7de91e2935e78aa5..27a52235db8ba884b255ff2b4b5c253b30ac82e7 100644 |
| --- a/build/config/compiler/BUILD.gn |
| +++ b/build/config/compiler/BUILD.gn |
| @@ -232,9 +232,6 @@ config("compiler") { |
| # ----------------------------------- |
| if (is_posix && !(is_mac || is_ios)) { |
| if (enable_profiling) { |
| - # Explicitly ask for frame pointers. Otherwise they are omitted when |
| - # any optimization level is used (and Android debug builds use -Os). |
| - cflags += [ "-fno-omit-frame-pointer" ] |
| if (!is_debug) { |
| cflags += [ "-g" ] |
| @@ -1238,13 +1235,6 @@ if (is_win) { |
| common_optimize_on_ldflags = [] |
| if (is_android) { |
| - # We don't omit frame pointers on arm64 since they are required |
| - # to correctly unwind stackframes which contain system library |
| - # function frames (crbug.com/391706). |
| - if (!using_sanitizer && !enable_profiling && current_cpu != "arm64") { |
| - common_optimize_on_cflags += [ "-fomit-frame-pointer" ] |
| - } |
| - |
| # TODO(jdduke) Re-enable on mips after resolving linking |
| # issues with libc++ (crbug.com/456380). |
| if (current_cpu != "mipsel" && current_cpu != "mips64el") { |
| @@ -1298,6 +1288,21 @@ if (is_win) { |
| } |
| } |
| +config("default_stack_frames") { |
| + if (is_posix && !(is_mac || is_ios)) { |
| + if (using_sanitizer || enable_profiling || is_debug || |
|
brettw
2016/08/24 18:27:02
This is still different from the old code on Andro
vmiura
2016/08/24 18:47:26
I may be missing a nuance, but I'm intentionally m
|
| + current_cpu == "arm64") { |
| + # Explicitly ask for frame pointers, otherwise: |
| + # * Stacks may be missing for sanitizer and profiling builds. |
| + # * Debug tcmalloc can crash (crbug.com/636489). |
| + # * Stacks may be missing for arm64 crash dumps (crbug.com/391706). |
| + cflags = [ "-fno-omit-frame-pointer" ] |
| + } else if (is_android) { |
| + cflags = [ "-fomit-frame-pointer" ] |
|
brettw
2016/08/24 19:30:02
I mean this line. It used to not set this on the A
vmiura
2016/08/24 19:40:16
Thanks, yeah I think that 'android_full_debug' is
|
| + } |
| + } |
| +} |
| + |
| # Default "optimization on" config. |
| config("optimize") { |
| if (is_win) { |
| @@ -1357,13 +1362,6 @@ config("no_optimize") { |
| "-ffunction-sections", |
| ] |
| - # We don't omit frame pointers on arm64 since they are required |
| - # to correctly unwind stackframes which contain system library |
| - # function frames (crbug.com/391706). |
| - if (!using_sanitizer && !enable_profiling && current_cpu != "arm64") { |
| - cflags += [ "-fomit-frame-pointer" ] |
| - } |
| - |
| # Don't use gc-sections since it can cause links to succeed when they |
| # actually shouldn't. http://crbug.com/159847 |
| ldflags = common_optimize_on_ldflags - [ "-Wl,--gc-sections" ] |