Skip to content

Commit

Permalink
[EH] __USING_EMSCRIPTEN_EXCEPTIONS__ -> __EMSCRIPTEN_EXCEPTIONS__ (#2…
Browse files Browse the repository at this point in the history
…1972)

In line with #21970.
  • Loading branch information
aheejin authored May 21, 2024
1 parent cada1eb commit f969e30
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions system/lib/libcxxabi/src/cxa_exception.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

namespace __cxxabiv1 {

#ifdef __USING_EMSCRIPTEN_EXCEPTIONS__
#ifdef __EMSCRIPTEN_EXCEPTIONS__

struct _LIBCXXABI_HIDDEN __cxa_exception {
size_t referenceCount;
Expand Down Expand Up @@ -184,7 +184,7 @@ extern "C" _LIBCXXABI_FUNC_VIS __cxa_eh_globals * __cxa_get_globals_fast ();
extern "C" _LIBCXXABI_FUNC_VIS void * __cxa_allocate_dependent_exception ();
extern "C" _LIBCXXABI_FUNC_VIS void __cxa_free_dependent_exception (void * dependent_exception);

#endif // !__USING_EMSCRIPTEN_EXCEPTIONS__
#endif // !__EMSCRIPTEN_EXCEPTIONS__

} // namespace __cxxabiv1

Expand Down
2 changes: 1 addition & 1 deletion system/lib/libcxxabi/src/cxa_handlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ __attribute__((noreturn))
void
terminate() noexcept
{
#if !defined(_LIBCXXABI_NO_EXCEPTIONS) && !defined(__USING_EMSCRIPTEN_EXCEPTIONS__)
#if !defined(_LIBCXXABI_NO_EXCEPTIONS) && !defined(__EMSCRIPTEN_EXCEPTIONS__)
// If there might be an uncaught exception
using namespace __cxxabiv1;
__cxa_eh_globals* globals = __cxa_get_globals_fast();
Expand Down
2 changes: 1 addition & 1 deletion system/lib/libcxxabi/src/private_typeinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1560,6 +1560,6 @@ int __cxa_is_pointer_type(__shim_type_info* type) {
}

}
#endif // __USING_EMSCRIPTEN_EXCEPTIONS__
#endif // __EMSCRIPTEN_EXCEPTIONS__

} // __cxxabiv1
2 changes: 1 addition & 1 deletion tools/maint/gen_struct_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ def main(args):

cxxflags = [
'-I' + utils.path_from_root('system/lib/libcxxabi/src'),
'-D__USING_EMSCRIPTEN_EXCEPTIONS__',
'-D__EMSCRIPTEN_EXCEPTIONS__',
'-I' + utils.path_from_root('system/lib/wasmfs/'),
'-std=c++17',
]
Expand Down
4 changes: 2 additions & 2 deletions tools/system_libs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1570,7 +1570,7 @@ def get_cflags(self):
if self.eh_mode == Exceptions.NONE:
cflags.append('-D_LIBCXXABI_NO_EXCEPTIONS')
elif self.eh_mode == Exceptions.EMSCRIPTEN:
cflags.append('-D__USING_EMSCRIPTEN_EXCEPTIONS__')
cflags.append('-D__EMSCRIPTEN_EXCEPTIONS__')
# The code used to interpret exceptions during terminate
# is not compatible with emscripten exceptions.
cflags.append('-DLIBCXXABI_SILENT_TERMINATE')
Expand Down Expand Up @@ -1684,7 +1684,7 @@ def get_cflags(self):
if self.eh_mode == Exceptions.NONE:
cflags.append('-D_LIBUNWIND_HAS_NO_EXCEPTIONS')
elif self.eh_mode == Exceptions.EMSCRIPTEN:
cflags.append('-D__USING_EMSCRIPTEN_EXCEPTIONS__')
cflags.append('-D__EMSCRIPTEN_EXCEPTIONS__')
elif self.eh_mode == Exceptions.WASM:
cflags.append('-D__WASM_EXCEPTIONS__')
return cflags
Expand Down

0 comments on commit f969e30

Please sign in to comment.