I'm not sure what the problem was at the time, however I don't think
this is necessary since buildit doesn't exist anymore.
Instead of the workaround, the correct thing to do is to leave out
the get_new_handler/set_new_handler definitions from libc++ when
we're getting them from libc++abi.
The reasoning here is that for Apple builds, we never define _LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY (maybe we used to but we don't anymore). Hence, the conditional is equivalent to:
Furthermore, we always define _LIBCPP_DISABLE_NEW_DELETE_DEFINITIONS for Apple builds, and nobody else I'm aware of does it, so this conditional is equivalent to
Now we take the #else branch and that's the refactor.
The only thing this could break is if someone builds libc++ with _LIBCPP_DISABLE_NEW_DELETE_DEFINITIONS but their ABI library doesn't provide get_new_handler/set_new_handler. However, I'm not aware of any such user (and frankly if they exist then they're probably following these reviews).