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

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

Issue 2782063005: Explicitly specify whether to emit frame pointers by default. (Closed)
Patch Set: Rebase. 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..2902acf9b55658cf642ba73ba593dddeb482456a 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 (enabled_frame_pointers) {
cflags = [ "-fno-omit-frame-pointer" ]
- } else if (is_android) {
+ } else {
cflags = [ "-fomit-frame-pointer" ]
Mark Mentovai 2017/03/30 23:43:29 I think we’d never want this in a debug-ish config
erikchen 2017/04/03 06:33:39 I'm just maintaining the previous behavior.
}
}
+
+ if (is_win) {
+ if (enabled_frame_pointers) {
+ 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