Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2970)

Unified Diff: build/config/compiler/BUILD.gn

Issue 2782063005: Explicitly specify whether to emit frame pointers by default. (Closed)
Patch Set: Fix Windows logic. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.

Powered by Google App Engine
This is Rietveld 408576698