fix: link Chromium's libunwind when using sanitizers

Following https://crev.com/d3d85ce0b330b11f73f0495b7b99cea0d04d8c63,
the compiler now does not build an unwind library into the ASAN
runtime, nor is one available from the NDK in r23. Restoring Chrome's
standard dependencies (libcxx, libunwind) prevents a link error.

Bug: 1271628
Change-Id: I62d1c066bd7037276d78e2533dd5e4c3cf14f8c7
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3298826
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Richard Townsend <richard.townsend@arm.com>
This commit is contained in:
Richard Townsend 2021-11-22 12:08:35 +00:00 committed by Crashpad LUCI CQ
parent c537245de8
commit 0fdeeecba6

View File

@ -214,7 +214,11 @@ if (crashpad_is_android) {
libs = [ "log" ]
if (crashpad_is_in_chromium) {
no_default_deps = true
# Chromium's sanitizer runtime libraries do not include an unwinder,
# so add Chromium's standard dependencies to link against the in-tree
# libunwind.
import("//build/config/sanitizers/sanitizers.gni")
no_default_deps = !using_sanitizer
remove_configs =
[ "//build/config/android:default_orderfile_instrumentation" ]
}