diff options
Diffstat (limited to 'system/lib/libcxxabi/src/cxa_new_delete.cpp')
-rw-r--r-- | system/lib/libcxxabi/src/cxa_new_delete.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/system/lib/libcxxabi/src/cxa_new_delete.cpp b/system/lib/libcxxabi/src/cxa_new_delete.cpp index 6352001b..e6fee5f2 100644 --- a/system/lib/libcxxabi/src/cxa_new_delete.cpp +++ b/system/lib/libcxxabi/src/cxa_new_delete.cpp @@ -228,4 +228,15 @@ bad_array_new_length::what() const _NOEXCEPT return "bad_array_new_length"; } +#ifdef EMSCRIPTEN +// We don't build the new.cpp from libcxx, so we need to define this. +void +__throw_bad_alloc() +{ +#ifndef _LIBCPP_NO_EXCEPTIONS + throw bad_alloc(); +#endif +} +#endif + } // std |