This is an archive of the discontinued LLVM Phabricator instance.

Allow using libsupc++ with LIBCXX_ENABLE_STATIC_ABI_LIBRARY
ClosedPublic

Authored by mdaniels on Nov 1 2016, 6:53 AM.

Details

Summary

The code cannot currently link when using libsupc++ with the LIBCXX_ENABLE_STATIC_ABI_LIBRARY option.

This change ifdef's out the the destructor and 'what' function for bad_array_length and bad_array_new_length when GLIBCXX is defined. The constructors that are left in are the only functions not being provided by libsupc++ itself, and follows the same pattern that was used to ifdef bad_alloc.

Testing was done on a Linux x86_64 host using GCC 5.4 and libc++ from ToT. I see no change to the test results when using libsup++ or libstdc++ without LIBCXX_ENABLE_STATIC_ABI_LIBRARY. When using libsupc++ with LIBCXX_ENABLE_STATIC_ABI_LIBRARY it will now build and test results are the same as those without the option specified.

Diff Detail

Event Timeline

mdaniels updated this revision to Diff 76546.Nov 1 2016, 6:53 AM
mdaniels retitled this revision from to Allow using libsupc++ with LIBCXX_ENABLE_STATIC_ABI_LIBRARY.
mdaniels updated this object.
mdaniels added reviewers: EricWF, mclow.lists.
EricWF accepted this revision.Nov 4 2016, 6:12 PM
EricWF edited edge metadata.

LGTM. It seems like it was added to libstdc++ in 4.9, which works for me since building with GCC 4.8 isn't really supported.

This revision is now accepted and ready to land.Nov 4 2016, 6:12 PM

I don't have commit access, could I trouble someone to do it on my behalf?

EricWF closed this revision.Nov 18 2016, 2:35 PM

Committed as r287388.