libc++: Disable exceptions and RTTI
Except on Mac, where exceptions are required. And except on Android, where rtti is required.master
parent
ce1795a852
commit
179ef11f40
|
@ -114,14 +114,10 @@ builtin_modules("_Builtin_unwind") {
|
|||
configs_to_add = [
|
||||
":config",
|
||||
"//build/config/compiler:no_chromium_code",
|
||||
"//build/config/compiler:exceptions",
|
||||
"//build/config/compiler:rtti",
|
||||
]
|
||||
|
||||
configs_to_remove = [
|
||||
"//build/config/compiler:chromium_code",
|
||||
"//build/config/compiler:no_exceptions",
|
||||
"//build/config/compiler:no_rtti",
|
||||
"//build/config/coverage:default_coverage",
|
||||
]
|
||||
|
||||
|
|
|
@ -102,4 +102,34 @@ target(libcxxabi_target_type, "libc++abi") {
|
|||
if (use_libcxx_modules) {
|
||||
configs -= [ "//build/config/compiler:libcxx_module" ]
|
||||
}
|
||||
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