Chromium Code Reviews| Index: build/config/compiler/BUILD.gn |
| diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn |
| index 6774b2a36b68419ac0e649da0b3292ff3e15647b..0d5953392da6bca3db282f1d413ae457f9fdd7d0 100644 |
| --- a/build/config/compiler/BUILD.gn |
| +++ b/build/config/compiler/BUILD.gn |
| @@ -1294,7 +1294,6 @@ config("no_incompatible_pointer_warnings") { |
| if (is_win) { |
| common_optimize_on_cflags = [ |
| "/Ob2", # Both explicit and auto inlining. |
| - "/Oy-", # Disable omitting frame pointers, must be after /O2. |
| "/d2Zi+", # Improve debugging of optimized code. |
| "/Zc:inline", # Remove unreferenced COMDAT (faster links). |
| ] |
| @@ -1384,18 +1383,21 @@ if (is_win) { |
| } |
| config("default_stack_frames") { |
| - if (is_posix && !(is_mac || is_ios)) { |
| - if (using_sanitizer || enable_profiling || is_debug || |
| - 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). |
| + if (is_posix) { |
| + if (emit_frame_pointers_by_default) { |
|
Primiano Tucci (use gerrit)
2017/03/30 13:15:03
(Just some naming bikeshedding)
1. by_default
just
erikchen
2017/03/30 22:12:47
Done.
|
| cflags = [ "-fno-omit-frame-pointer" ] |
| - } else if (is_android) { |
| + } else { |
| cflags = [ "-fomit-frame-pointer" ] |
| } |
| } |
| + |
| + if (is_win) { |
| + if (emit_frame_pointers_by_default) { |
| + common_optimize_on_cflags += [ "/Oy-" ] # Disable omitting frame pointers, must be after /O2. |
| + } else { |
| + common_optimize_on_cflags += [ "/Oy" ] |
| + } |
| + } |
| } |
| # Default "optimization on" config. |