summaryrefslogtreecommitdiffstats
path: root/libcxx/src/exception.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/src/exception.cpp')
-rw-r--r--libcxx/src/exception.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libcxx/src/exception.cpp b/libcxx/src/exception.cpp
index 96bd7ee59a0..ec8969aaf4c 100644
--- a/libcxx/src/exception.cpp
+++ b/libcxx/src/exception.cpp
@@ -12,7 +12,8 @@
#include "exception"
#include "new"
-#if defined(__APPLE__) && !defined(LIBCXXRT)
+#if defined(__APPLE__) && !defined(LIBCXXRT) && \
+ !defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY)
#include <cxxabi.h>
using namespace __cxxabiv1;
@@ -106,7 +107,8 @@ bool uncaught_exception() _NOEXCEPT { return uncaught_exceptions() > 0; }
int uncaught_exceptions() _NOEXCEPT
{
-#if defined(__APPLE__) || defined(_LIBCPPABI_VERSION)
+#if !defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY) && \
+ (defined(__APPLE__) || defined(_LIBCPPABI_VERSION))
// on Darwin, there is a helper function so __cxa_get_globals is private
# if _LIBCPPABI_VERSION > 1101
return __cxa_uncaught_exceptions();
OpenPOWER on IntegriCloud