mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2026-08-18 06:55:34 +03:00
libc++: Disable exceptions and RTTI
Except on Mac, where exceptions are required. And except on Android, where rtti is required.
This commit is contained in:
4
src/buildtools/third_party/libc++/BUILD.gn
vendored
4
src/buildtools/third_party/libc++/BUILD.gn
vendored
@@ -598,15 +598,11 @@ target(libcxx_target_type, "libc++") {
|
||||
# exception and rtti.
|
||||
configs -= [
|
||||
"//build/config/compiler:chromium_code",
|
||||
"//build/config/compiler:no_exceptions",
|
||||
"//build/config/compiler:no_rtti",
|
||||
"//build/config/coverage:default_coverage",
|
||||
]
|
||||
configs += [
|
||||
":config",
|
||||
"//build/config/compiler:no_chromium_code",
|
||||
"//build/config/compiler:exceptions",
|
||||
"//build/config/compiler:rtti",
|
||||
]
|
||||
|
||||
deps = [
|
||||
|
||||
31
src/buildtools/third_party/libc++abi/BUILD.gn
vendored
31
src/buildtools/third_party/libc++abi/BUILD.gn
vendored
@@ -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",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user