libc++: Disable exceptions and RTTI
Except on Mac, where exceptions are required. And except on Android, where rtti is required.pull/792/head
parent
dd3c44be83
commit
9dc11c2d47
|
|
@ -600,12 +600,8 @@ target(libcxx_target_type, "libc++") {
|
|||
# so that modules can be used for other chromium targets which don't enable
|
||||
# exception and rtti.
|
||||
configs -= configs_to_remove + [
|
||||
"//build/config/compiler:no_exceptions",
|
||||
"//build/config/compiler:no_rtti",
|
||||
]
|
||||
configs += configs_to_add + [
|
||||
"//build/config/compiler:exceptions",
|
||||
"//build/config/compiler:rtti",
|
||||
]
|
||||
|
||||
deps = [
|
||||
|
|
|
|||
|
|
@ -105,4 +105,35 @@ target(libcxxabi_target_type, "libc++abi") {
|
|||
# Disabling -Wexit-time-destructors, as libc++abi uses a static object for
|
||||
# at exit management (see `static DtorsManager manager`).
|
||||
configs += [ "//build/config/compiler:no_exit_time_destructors" ]
|
||||
|
||||
if (!is_apple) {
|
||||
sources -= [
|
||||
"//third_party/libc++abi/src/src/cxa_exception.cpp",
|
||||
"//third_party/libc++abi/src/src/cxa_personality.cpp",
|
||||
"//third_party/libc++abi/src/src/private_typeinfo.cpp",
|
||||
]
|
||||
sources += [
|
||||
"//third_party/libc++abi/src/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",
|
||||
]
|
||||
}
|
||||
if (is_android) {
|
||||
sources += [
|
||||
"//third_party/libc++abi/src/src/private_typeinfo.cpp",
|
||||
]
|
||||
configs -= [
|
||||
"//build/config/compiler:no_rtti",
|
||||
]
|
||||
configs += [
|
||||
"//build/config/compiler:rtti",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue