Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unwinding on Android #4894

Merged
merged 2 commits into from
Feb 17, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion build/config/compiler/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -318,13 +318,25 @@ config("exceptions_default") {
configs = [ ":no_exceptions" ]
}

config("unwind_tables_default") {
config("unwind_tables") {
cflags = [ "-funwind-tables" ]
}

config("no_unwind_tables") {
cflags = [
"-fno-unwind-tables",
"-fno-asynchronous-unwind-tables",
]
}

config("unwind_tables_default") {
if (current_os == "android") {
configs = [ ":unwind_tables" ]
} else {
configs = [ ":no_unwind_tables" ]
}
}

config("size_default") {
cflags = [
"-fno-common",
Expand Down
5 changes: 5 additions & 0 deletions build/config/defaults.gni
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ declare_args() {
default_configs_exceptions =
[ "${build_root}/config/compiler:exceptions_default" ]

# Default configs for unwind tables.
default_configs_unwind_tables =
[ "${build_root}/config/compiler:unwind_tables_default" ]

# Defaults configs for rtti.
default_configs_rtti = [ "${build_root}/config/compiler:rtti_default" ]

Expand Down Expand Up @@ -91,6 +95,7 @@ default_configs += default_configs_symbols
default_configs += default_configs_size
default_configs += default_configs_specs
default_configs += default_configs_exceptions
default_configs += default_configs_unwind_tables
default_configs += default_configs_pic
default_configs += default_configs_rtti
default_configs += default_configs_warnings
Expand Down