Skip to content

Add downstream library changes from emscripten #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions libcxx/include/__locale_dir/locale_base_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
#ifndef _LIBCPP___LOCALE_DIR_LOCALE_BASE_API_H
#define _LIBCPP___LOCALE_DIR_LOCALE_BASE_API_H

#if defined(_LIBCPP_MSVCRT_LIKE)
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__EMSCRIPTEN__)
# include <xlocale.h>
#elif defined(_LIBCPP_MSVCRT_LIKE)
# include <__locale_dir/locale_base_api/win32.h>
#elif defined(_AIX) || defined(__MVS__)
# include <__locale_dir/locale_base_api/ibm.h>
Expand All @@ -25,8 +27,6 @@
# include <__locale_dir/locale_base_api/fuchsia.h>
#elif defined(__wasi__) || defined(_LIBCPP_HAS_MUSL_LIBC)
# include <__locale_dir/locale_base_api/musl.h>
#elif defined(__APPLE__) || defined(__FreeBSD__)
# include <xlocale.h>
#endif

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down
4 changes: 2 additions & 2 deletions libcxxabi/src/cxa_exception.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -789,9 +789,9 @@ __cxa_rethrow_primary_exception(void* thrown_object)
// In debug mode, call a JS library function to use
// WebAssembly.Exception JS API, which enables us to include stack
// traces
__throw_exception_with_stack_trace(&exception_header->unwindHeader);
__throw_exception_with_stack_trace(&dep_exception_header->unwindHeader);
#else
_Unwind_RaiseException(&exception_header->unwindHeader);
_Unwind_RaiseException(&dep_exception_header->unwindHeader);
#endif
// Some sort of unwinding error. Note that terminate is a handler.
__cxa_begin_catch(&dep_exception_header->unwindHeader);
Expand Down
4 changes: 2 additions & 2 deletions libcxxabi/src/private_typeinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1546,7 +1546,7 @@ __base_class_type_info::search_below_dst(__dynamic_cast_info* info,


// XXX EMSCRIPTEN
#ifndef __WASM_EXCEPTIONS__
#if defined(__wasm__) && !defined(__WASM_EXCEPTIONS__)

#include "cxa_exception.h"

Expand Down Expand Up @@ -1601,5 +1601,5 @@ void *__cxa_get_exception_ptr(void *thrown_object) throw() {

} // __cxxabiv1

#endif // !__WASM_EXCEPTIONS__
#endif // __wasm__ && !__WASM_EXCEPTIONS__