Index: build/config/compiler/BUILD.gn |
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn |
index 7e65dfa41cf0301123c3af3e376133a59d6eb3fb..79723f6cc76c041697955f5c7de91e2935e78aa5 100644 |
--- a/build/config/compiler/BUILD.gn |
+++ b/build/config/compiler/BUILD.gn |
@@ -231,13 +231,10 @@ |
# Non-Mac Posix compiler flags setup. |
# ----------------------------------- |
if (is_posix && !(is_mac || is_ios)) { |
- if (enable_profiling || is_debug) { |
- # Explicitly ask for frame pointers, otherwise they are omitted when |
- # any optimization level is used (Android debug builds use -Os.) |
- # This prevents stack frames from working when profiling, and can cause |
- # crashes when unwinding stack frames (crbug.com/636489). |
+ 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" ] |
@@ -1277,13 +1274,6 @@ |
"-ffunction-sections", |
] |
- if (is_debug) { |
- # Explicitly ask for frame pointers, otherwise they are omitted when |
- # any optimization level is used and can cause crashes when unwinding |
- # stack frames (crbug.com/636489). |
- common_optimize_on_cflags += [ "-fno-omit-frame-pointer" ] |
- } |
- |
common_optimize_on_ldflags += [ |
# Specifically tell the linker to perform optimizations. |
# See http://lwn.net/Articles/192624/ . |