Commit ce8a007f authored by Torne (Richard Coles)'s avatar Torne (Richard Coles) Committed by Commit Bot

Make exclude_unwind_tables into a GN arg again.

This was removed from the declare_args section some time ago, but for
AOSP system implementors it may be desirable to manually control it.
Re-add it as an argument, and document how to use it in the WebView AOSP
build guide.

Fixed: 1034192
Change-Id: Ic5f890f2ad3677bb76ce87951ee0d7d3f20551b9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1976331Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Reviewed-by: default avatarNate Fischer <ntfschr@chromium.org>
Commit-Queue: Richard Coles <torne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#730188}
parent 480cebee
...@@ -195,10 +195,6 @@ is_component_build = false ...@@ -195,10 +195,6 @@ is_component_build = false
# Disable Google-specific branding/features # Disable Google-specific branding/features
is_chrome_branded = false is_chrome_branded = false
use_official_google_api_keys = false use_official_google_api_keys = false
# Significantly reduces binary size at the cost of preventing Android's native
# crash handler from being able to produce useful stack unwindings.
exclude_unwind_tables = true
``` ```
The `target_cpu` option must be set to The `target_cpu` option must be set to
...@@ -271,6 +267,24 @@ ffmpeg_branding = "Chrome" ...@@ -271,6 +267,24 @@ ffmpeg_branding = "Chrome"
proprietary_codecs = true proprietary_codecs = true
``` ```
#### Crash stack unwinding
By default, builds using `is_official_build = true` exclude unwind tables from
the binaries, as they significantly increase binary size. Google's builds rely
on crashes being reported using Crashpad, which can then be decoded server-side.
If you don't intend to enable Crashpad and set up dedicated crash reporting
infrastructure for your WebView, you may wish to re-enable the unwind tables
with the following GN argument:
``` gn
exclude_unwind_tables = false
```
This will allow Android's debuggerd to produce meaningful stack traces for
crashes that occur inside WebView's native code. We don't recommend using this
setting in shipping builds due to the binary size impact, but it may be the only
alternative if using Crashpad is impractical.
#### Other build options #### Other build options
Other build options may be used but are not supported by the WebView team and Other build options may be used but are not supported by the WebView team and
......
...@@ -85,19 +85,21 @@ declare_args() { ...@@ -85,19 +85,21 @@ declare_args() {
# is_component_build=false. Very large debug symbols can have unwanted side # is_component_build=false. Very large debug symbols can have unwanted side
# effects so this is enforced by default for chromium. # effects so this is enforced by default for chromium.
forbid_non_component_debug_builds = build_with_chromium forbid_non_component_debug_builds = build_with_chromium
# Exclude unwind tables by default for official builds as unwinding can be
# done from stack dumps produced by Crashpad at a later time "offline" in the
# crash server. Since this increases binary size, we don't recommend including
# them in shipping builds.
# For unofficial (e.g. development) builds and non-Chrome branded (e.g. Cronet
# which doesn't use Crashpad, crbug.com/479283) builds it's useful to be able
# to unwind at runtime.
exclude_unwind_tables =
is_official_build || (is_chromecast && !is_cast_desktop_build &&
!is_debug && !cast_is_debug && !is_fuchsia)
} }
assert(!is_cfi || use_thin_lto, "CFI requires ThinLTO") assert(!is_cfi || use_thin_lto, "CFI requires ThinLTO")
# Exclude unwind tables for official builds as unwinding can be done from stack
# dumps produced by Crashpad at a later time "offline" in the crash server.
# For unofficial (e.g. development) builds and non-Chrome branded (e.g. Cronet
# which doesn't use Crashpad, crbug.com/479283) builds it's useful to be able
# to unwind at runtime.
exclude_unwind_tables =
is_official_build || (is_chromecast && !is_cast_desktop_build &&
!is_debug && !cast_is_debug && !is_fuchsia)
# If true, optimize for size. Does not affect windows builds. # If true, optimize for size. Does not affect windows builds.
# Linux & Mac favor speed over size. # Linux & Mac favor speed over size.
# TODO(brettw) it's weird that Mac and desktop Linux are different. We should # TODO(brettw) it's weird that Mac and desktop Linux are different. We should
......
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