summaryrefslogtreecommitdiffstats
path: root/libcxx/src/new.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/src/new.cpp')
-rw-r--r--libcxx/src/new.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libcxx/src/new.cpp b/libcxx/src/new.cpp
index 3d8b2a9d8a6..734d93136b5 100644
--- a/libcxx/src/new.cpp
+++ b/libcxx/src/new.cpp
@@ -13,7 +13,8 @@
#include "new"
-#if defined(__APPLE__) && !defined(LIBCXXRT)
+#if defined(__APPLE__) && !defined(LIBCXXRT) && \
+ !defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY)
#include <cxxabi.h>
#ifndef _LIBCPPABI_VERSION
@@ -26,7 +27,8 @@
#if defined(LIBCXXRT) || defined(LIBCXX_BUILDING_LIBCXXABI)
#include <cxxabi.h>
#endif // defined(LIBCXX_BUILDING_LIBCXXABI)
- #if !defined(_LIBCPPABI_VERSION) && !defined(__GLIBCXX__)
+ #if defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY) || \
+ (!defined(_LIBCPPABI_VERSION) && !defined(__GLIBCXX__))
static std::new_handler __new_handler;
#endif // _LIBCPPABI_VERSION
#endif
OpenPOWER on IntegriCloud