Make it possible to link against libstdc++ as well as libsupc++ with CMake.
Linking against libstdc++, rather than libsupc++, is probably better
for people who need to link against clients of libstdc++. Because
libsupc++ is provided only as a static library, its globals are not
shared between the static library and the copy linked into libstdc++.
This has been found to cause at least one test failure.
This also removes a number of symbols which were multiply defined
between libstdc++ and libc++, only when linking with libstdc++.
Differential Revision: http://llvm-reviews.chandlerc.com/D1825
llvm-svn: 192075
diff --git a/libcxx/src/new.cpp b/libcxx/src/new.cpp
index f24014d..fa0331a 100644
--- a/libcxx/src/new.cpp
+++ b/libcxx/src/new.cpp
@@ -224,6 +224,8 @@
#endif // _LIBCPPABI_VERSION
+#ifndef LIBSTDCXX
+
void
__throw_bad_alloc()
{
@@ -232,4 +234,6 @@
#endif
}
+#endif // !LIBSTDCXX
+
} // std