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

Unified Diff: build/config/compiler/compiler.gni

Issue 2782063005: Explicitly specify whether to emit frame pointers by default. (Closed)
Patch Set: arm64 -> arm Created 3 years, 8 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
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | chrome/browser/chromeos/libc_close_tracking.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/compiler/compiler.gni
diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni
index 403dd4fd320e37951467fadc5c3a116e92405bf5..2cb9637059831e9809dc97540d0b49da5b1df17e 100644
--- a/build/config/compiler/compiler.gni
+++ b/build/config/compiler/compiler.gni
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//build/config/android/config.gni")
+import("//build/config/arm.gni")
import("//build/config/chrome_build.gni")
import("//build/config/chromecast_build.gni")
import("//build/config/compiler/pgo/pgo.gni")
@@ -65,6 +66,34 @@ declare_args() {
use_pic = true
}
+# Whether to emit frame pointers by default.
+if (is_mac || is_ios) {
+ enabled_frame_pointers = true
+} else if (is_win) {
+ # 64-bit Windows ABI doesn't support frame pointers.
+ if (target_cpu == "x64") {
+ enabled_frame_pointers = false
+ } else {
+ enabled_frame_pointers = true
+ }
+} else {
+ # 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).
+ enabled_frame_pointers =
+ using_sanitizer || enable_profiling || is_debug || current_cpu == "arm64"
+}
+
+# Unwinding with frame pointers requires that frame pointers are enabled by
+# default for most translation units, and that the architecture isn't thumb, as
+# frame pointers are not correctly emitted for thumb.
+if (enabled_frame_pointers && !(current_cpu == "arm" && arm_use_thumb)) {
+ can_unwind_with_frame_pointers = true
+} else {
+ can_unwind_with_frame_pointers = false
+}
+
declare_args() {
# Whether or not the official builds should be built with full WPO. Enabled by
# default for the PGO and the x64 builds.
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | chrome/browser/chromeos/libc_close_tracking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698