Commit d20e971b authored by Ambre Williams's avatar Ambre Williams Committed by Commit Bot

[libunwind] Build with -funwind-tables

This adds the -funwind-tables flag when compiling libunwind. This allows
unwinding past, eg. _Unwind_RaiseException.
The upstream cmake build adds it when it is supported, and generation of
unwind tables is already done for all the libunwind C++ code since
it compiles with exceptions enabled.

Also pass -fexceptions to the C code on Fuchsia only to work around
https://bugs.llvm.org/show_bug.cgi?id=45875.

Bug: 1078588
Change-Id: Id821f143c12e7e1e376eea534be52c6cd8504465
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2218273
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#774598}
parent 2f1818e8
...@@ -11,7 +11,18 @@ config("libunwind_config") { ...@@ -11,7 +11,18 @@ config("libunwind_config") {
# ValueAsBitPattern in Unwind-EHABI.cpp is only used on Debug builds. # ValueAsBitPattern in Unwind-EHABI.cpp is only used on Debug builds.
"-Wno-unused-function", "-Wno-unused-function",
# libunwind expects to be compiled with unwind tables so it can
# unwind its own frames.
"-funwind-tables",
] ]
if (is_fuchsia) {
# Workaround for https://bugs.llvm.org/show_bug.cgi?id=45875:
# compiling the C code with -fexceptions ensures that accurate
# unwinding information is generated for _Unwind_RaiseException.
cflags_c = [ "-fexceptions" ]
}
} }
source_set("libunwind") { source_set("libunwind") {
......
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