mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-25 14:56:10 +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:
parent
eb1f76ad1b
commit
834b4aef37
4
src/buildtools/third_party/libc++/BUILD.gn
vendored
4
src/buildtools/third_party/libc++/BUILD.gn
vendored
@ -160,8 +160,6 @@ target(_libcxx_target_type, "libc++") {
|
|||||||
}
|
}
|
||||||
configs -= [
|
configs -= [
|
||||||
"//build/config/compiler:chromium_code",
|
"//build/config/compiler:chromium_code",
|
||||||
"//build/config/compiler:no_exceptions",
|
|
||||||
"//build/config/compiler:no_rtti",
|
|
||||||
"//build/config/coverage:default_coverage",
|
"//build/config/coverage:default_coverage",
|
||||||
]
|
]
|
||||||
if ((is_android || is_apple) && libcxx_is_shared) {
|
if ((is_android || is_apple) && libcxx_is_shared) {
|
||||||
@ -175,8 +173,6 @@ target(_libcxx_target_type, "libc++") {
|
|||||||
configs += [
|
configs += [
|
||||||
":config",
|
":config",
|
||||||
"//build/config/compiler:no_chromium_code",
|
"//build/config/compiler:no_chromium_code",
|
||||||
"//build/config/compiler:exceptions",
|
|
||||||
"//build/config/compiler:rtti",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if (libcxx_is_shared && !is_win) {
|
if (libcxx_is_shared && !is_win) {
|
||||||
|
30
src/buildtools/third_party/libc++abi/BUILD.gn
vendored
30
src/buildtools/third_party/libc++abi/BUILD.gn
vendored
@ -98,4 +98,34 @@ source_set("libc++abi") {
|
|||||||
|
|
||||||
# libc++abi depends on libc++ internals.
|
# libc++abi depends on libc++ internals.
|
||||||
include_dirs = [ "//third_party/libc++/src/src" ]
|
include_dirs = [ "//third_party/libc++/src/src" ]
|
||||||
|
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
Block a user