Commit f4bb44bd authored by Albert J. Wong's avatar Albert J. Wong Committed by Commit Bot

Revert "Enable frame pointers on arm32."

This reverts commit 8c29b757.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Enable frame pointers on arm32.
> 
> LLVM fixed the bug where framepointers were not located next to the return
> address in thumb mode. https://bugs.llvm.org/show_bug.cgi?id=18505
> 
> With that fix, enabling framepointers on arm32 bring it in line with other
> build configurations and allows for better stack traces.
> 
> Bug: 786450
> Change-Id: I01a1c9f82fac22b2bbc15c6f52deed8aca7263ea
> Reviewed-on: https://chromium-review.googlesource.com/826255
> Reviewed-by: Brett Wilson <brettw@chromium.org>
> Commit-Queue: Albert J. Wong <ajwong@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#524127}

TBR=ajwong@chromium.org,brettw@chromium.org

Change-Id: Ie327529394021473cfffd0ee80baecce4bd83e2a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 786450
Reviewed-on: https://chromium-review.googlesource.com/828607Reviewed-by: default avatarAlbert J. Wong <ajwong@chromium.org>
Commit-Queue: Albert J. Wong <ajwong@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524337}
parent 275b3251
......@@ -91,7 +91,7 @@ optimize_for_size = is_android || is_ios
# Determine whether to enable or disable frame pointers, based on the platform
# and build arguments.
if (is_mac || is_ios || is_linux || is_chromeos) {
if (is_mac || is_ios || is_linux) {
enable_frame_pointers = true
} else if (is_win) {
# 64-bit Windows ABI doesn't support frame pointers.
......@@ -100,10 +100,16 @@ if (is_mac || is_ios || is_linux || is_chromeos) {
} else {
enable_frame_pointers = true
}
} else if (is_chromeos) {
# ChromeOS generally prefers frame pointers, to support CWP.
# However, Clang does not currently generate usable frame pointers in ARM
# 32-bit builds (https://bugs.llvm.org/show_bug.cgi?id=18505) so disable them
# there to avoid the unnecessary overhead.
enable_frame_pointers = current_cpu != "arm"
} else if (is_android) {
enable_frame_pointers =
# Ensure that stacks from arm64 crash dumps are usable (crbug.com/391706).
current_cpu == "arm64" || current_cpu == "arm" ||
current_cpu == "arm64" ||
# For x86 Android, unwind tables are huge without frame pointers
# (crbug.com/762629). Enabling frame pointers grows the code size slightly
# but overall shrinks binaries considerably by avoiding huge unwind
......@@ -121,7 +127,11 @@ if (is_mac || is_ios || is_linux || is_chromeos) {
# most translation units, that they are emitted correctly, and that the
# compiler or platform provides a way to access them.
can_unwind_with_frame_pointers = enable_frame_pointers
if (is_win) {
if (current_cpu == "arm" && arm_use_thumb) {
# We cannot currently unwind ARM Thumb frame pointers correctly.
# See https://bugs.llvm.org/show_bug.cgi?id=18505
can_unwind_with_frame_pointers = false
} else if (is_win) {
# Windows 32-bit does provide frame pointers, but the compiler does not
# provide intrinsics to access them, so we don't use them.
can_unwind_with_frame_pointers = false
......
......@@ -185,6 +185,7 @@ def build_gn_with_ninja_manually(tempdir, options):
{
'ENABLE_LOCATION_SOURCE': 'false',
'ENABLE_PROFILING': 'false',
'CAN_UNWIND_WITH_FRAME_POINTERS': 'false',
'UNSAFE_DEVELOPER_BUILD': 'false'
})
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment