diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2013-10-06 22:13:19 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2013-10-06 22:13:19 +0000 |
commit | 26dd09e57fffb23f5765ec6f7b9c0ef7b79afc82 (patch) | |
tree | 7890172bef5995076b84002b5c84e974bb56e3dd /libcxx/src | |
parent | 926aa5f4f24a2e34dfe8dcbe3875550e6e87f70c (diff) | |
download | bcm5719-llvm-26dd09e57fffb23f5765ec6f7b9c0ef7b79afc82.tar.gz bcm5719-llvm-26dd09e57fffb23f5765ec6f7b9c0ef7b79afc82.zip |
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
Diffstat (limited to 'libcxx/src')
-rw-r--r-- | libcxx/src/new.cpp | 4 | ||||
-rw-r--r-- | libcxx/src/stdexcept.cpp | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/libcxx/src/new.cpp b/libcxx/src/new.cpp index f24014d22df..fa0331a8b71 100644 --- a/libcxx/src/new.cpp +++ b/libcxx/src/new.cpp @@ -224,6 +224,8 @@ bad_array_new_length::what() const _NOEXCEPT #endif // _LIBCPPABI_VERSION +#ifndef LIBSTDCXX + void __throw_bad_alloc() { @@ -232,4 +234,6 @@ __throw_bad_alloc() #endif } +#endif // !LIBSTDCXX + } // std diff --git a/libcxx/src/stdexcept.cpp b/libcxx/src/stdexcept.cpp index 9ef78aac60d..a4207d6058f 100644 --- a/libcxx/src/stdexcept.cpp +++ b/libcxx/src/stdexcept.cpp @@ -127,7 +127,7 @@ logic_error::operator=(const logic_error& le) _NOEXCEPT return *this; } -#ifndef _LIBCPPABI_VERSION +#if !defined(_LIBCPPABI_VERSION) && !defined(LIBSTDCXX) logic_error::~logic_error() _NOEXCEPT { @@ -171,7 +171,7 @@ runtime_error::operator=(const runtime_error& le) _NOEXCEPT return *this; } -#ifndef _LIBCPPABI_VERSION +#if !defined(_LIBCPPABI_VERSION) && !defined(LIBSTDCXX) runtime_error::~runtime_error() _NOEXCEPT { |