Skip to content

Commit

Permalink
Reland "Fix conditions for can_unwind_with_cfi_table with frame point…
Browse files Browse the repository at this point in the history
…ers"

This reverts commit e34f08f.

Reason for revert: using_sanitizer should also set enable_frame_pointer on android.
The cfi bot was broken because it enabled cfi unwinding with frame pointers.

Original change's description:
> Revert "Fix conditions for can_unwind_with_cfi_table with frame pointers"
>
> This reverts commit 5e4c7d7.
>
> Reason for revert:
> Speculative revert for failing base_unittests on Android,
> CFIBacktraceAndroidTest.TestUnwinding.
>
> See https://uberchromegw.corp.google.com/i/chromium.memory/builders/Android%20CFI/builds/579
>
> Original change's description:
> > Fix conditions for can_unwind_with_cfi_table with frame pointers
> >
> > CFI table unwinder is not appilcable for builds with frame pointer
> > enabled. Make sure can_unwind_with_cfi_table is set to false.
> > No need to check for use_thin_lto.
> >
> > BUG=469376
> >
> > Change-Id: I71a4de08a0496edf26829c69851ea89bdbc02bd6
> > Reviewed-on: https://chromium-review.googlesource.com/992890
> > Reviewed-by: Peter Collingbourne <pcc@chromium.org>
> > Reviewed-by: Nico Weber <thakis@chromium.org>
> > Commit-Queue: Siddhartha S <ssid@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#548634}
>
> TBR=thakis@chromium.org,ssid@chromium.org,pcc@chromium.org
>
> Change-Id: I1bb99a9cde8fd501bd5abb7aa7fe798684454226
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 469376,826718
> Reviewed-on: https://chromium-review.googlesource.com/999635
> Reviewed-by: Mikel Astiz <mastiz@chromium.org>
> Commit-Queue: Mikel Astiz <mastiz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#548765}

Change-Id: Ic6637dfe890a51264f9d151a681534fe92fc9354
Bug: 469376, 826718
Reviewed-on: https://chromium-review.googlesource.com/1000412
Commit-Queue: Siddhartha S <ssid@chromium.org>
Reviewed-by: Peter Collingbourne <pcc@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Siddhartha S <ssid@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553287}
  • Loading branch information
ssiddhartha authored and Commit Bot committed Apr 24, 2018
1 parent 6e3549d commit 03d58e8
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions build/config/compiler/compiler.gni
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ if (is_mac || is_ios || is_linux) {
# (crbug.com/762629). Enabling frame pointers grows the code size slightly
# but overall shrinks binaries considerably by avoiding huge unwind
# tables.
(current_cpu == "x86" && !exclude_unwind_tables && optimize_for_size)
(current_cpu == "x86" && !exclude_unwind_tables && optimize_for_size) ||
using_sanitizer
} else {
# Explicitly ask for frame pointers, otherwise:
# * Stacks may be missing for sanitizer and profiling builds.
Expand All @@ -143,11 +144,8 @@ assert(!can_unwind_with_frame_pointers || enable_frame_pointers)

# Unwinding with CFI table is only possible on static library builds and
# requried only when frame pointers are not enabled.
# Builds with use_thin_lto use link registers to store offsets, and this is
# not supported yet.
can_unwind_with_cfi_table =
is_android && !is_component_build && !can_unwind_with_frame_pointers &&
current_cpu == "arm" && !use_thin_lto
can_unwind_with_cfi_table = is_android && !is_component_build &&
!enable_frame_pointers && current_cpu == "arm"

declare_args() {
# Whether or not the official builds should be built with full WPO. Enabled by
Expand Down

0 comments on commit 03d58e8

Please sign in to comment.