libc++: Disable exceptions and RTTI

Except on Mac, where disabling exceptions doesn't work.
This commit is contained in:
klzgrad 2019-11-30 21:52:42 +08:00
parent 61c26c389c
commit 7eaa739362
2 changed files with 19 additions and 4 deletions

View File

@ -123,8 +123,6 @@ target(_libcxx_target_type, "libc++") {
}
configs -= [
"//build/config/compiler:chromium_code",
"//build/config/compiler:no_exceptions",
"//build/config/compiler:no_rtti",
"//build/config/coverage:default_coverage",
]
if (is_android && libcxx_is_shared) {
@ -136,8 +134,6 @@ target(_libcxx_target_type, "libc++") {
configs += [
":config",
"//build/config/compiler:no_chromium_code",
"//build/config/compiler:exceptions",
"//build/config/compiler:rtti",
"//build/config/sanitizers:sanitizer_options_link_helper",
]
if (libcxx_is_shared && !is_win) {

View File

@ -90,4 +90,23 @@ source_set("libc++abi") {
# stdlib_stdexcept.cpp depends on libc++ internals.
include_dirs = [ "../libc++/trunk" ]
if (!is_mac) {
sources -= [
"trunk/src/cxa_exception.cpp",
"trunk/src/cxa_personality.cpp",
"trunk/src/private_typeinfo.cpp",
]
sources += [
"trunk/src/cxa_noexception.cpp",
]
defines += [ "_LIBCXXABI_NO_EXCEPTIONS" ]
configs -= [
"//build/config/compiler:exceptions",
"//build/config/compiler:rtti",
]
configs += [
"//build/config/compiler:no_exceptions",
"//build/config/compiler:no_rtti",
]
}
}