diff --git a/src/buildtools/third_party/libc++/BUILD.gn b/src/buildtools/third_party/libc++/BUILD.gn index 7a4cdd72f2..5da641c69b 100644 --- a/src/buildtools/third_party/libc++/BUILD.gn +++ b/src/buildtools/third_party/libc++/BUILD.gn @@ -105,8 +105,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) { @@ -115,8 +113,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) { diff --git a/src/buildtools/third_party/libc++abi/BUILD.gn b/src/buildtools/third_party/libc++abi/BUILD.gn index 22517c2768..972432dfda 100644 --- a/src/buildtools/third_party/libc++abi/BUILD.gn +++ b/src/buildtools/third_party/libc++abi/BUILD.gn @@ -78,4 +78,24 @@ source_set("libc++abi") { configs -= [ "//build/config/gcc:symbol_visibility_hidden" ] configs += [ "//build/config/gcc:symbol_visibility_default" ] } + + 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", + ] + } }