[CMake] Add support for selecting which c++ abi library to use.
llvm-svn: 169036
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 299fc29a59f7f301a1f33092c2ffab1ab22b67dc
diff --git a/src/exception.cpp b/src/exception.cpp
index 0dbb660..f5e6d22 100644
--- a/src/exception.cpp
+++ b/src/exception.cpp
@@ -41,7 +41,7 @@
namespace std
{
-#if !defined(LIBCXXRT) && !defined(_LIBCPPABI_VERSION)
+#if !defined(LIBCXXRT) && !defined(_LIBCPPABI_VERSION) && !defined(__GLIBCXX__)
// libcxxrt provides implementations of these functions itself.
unexpected_handler
@@ -99,7 +99,7 @@
}
#endif // !defined(LIBCXXRT) && !defined(_LIBCPPABI_VERSION)
-#ifndef LIBCXXRT
+#if !defined(LIBCXXRT) && !defined(__GLIBCXX__)
bool uncaught_exception() _NOEXCEPT
{
#if __APPLE__ || defined(_LIBCPPABI_VERSION)
@@ -124,7 +124,7 @@
#endif // _LIBCPPABI_VERSION
#endif //LIBCXXRT
-#ifndef _LIBCPPABI_VERSION
+#if !defined(_LIBCPPABI_VERSION) && !defined(__GLIBCXX__)
bad_exception::~bad_exception() _NOEXCEPT
{