diff --git a/system/lib/libcxxabi/src/format_exception.cpp b/system/lib/libcxxabi/src/cxa_exception_emscripten.cpp similarity index 73% rename from system/lib/libcxxabi/src/format_exception.cpp rename to system/lib/libcxxabi/src/cxa_exception_emscripten.cpp index 815e8b9918f59..e740d0fec97a0 100644 --- a/system/lib/libcxxabi/src/format_exception.cpp +++ b/system/lib/libcxxabi/src/cxa_exception_emscripten.cpp @@ -1,3 +1,13 @@ +//===------------------- cxa_exception_emscripten.cpp ---------------------===// +// +// This code contains Emscripten specific code for exception handling. +// Emscripten has two modes of exception handling: Emscripten EH, which uses JS +// glue code, and Wasm EH, which uses the new Wasm exception handling proposal +// and meant to be faster. Code for different modes is demarcated with +// '__USING_EMSCRIPTEN_EXCEPTIONS__' and '__USING_WASM_EXCEPTIONS__'. +// +//===----------------------------------------------------------------------===// + #include "cxa_exception.h" #include "private_typeinfo.h" #include diff --git a/tools/system_libs.py b/tools/system_libs.py index 5c2c003cf1497..2f1d72b19879a 100644 --- a/tools/system_libs.py +++ b/tools/system_libs.py @@ -1203,7 +1203,7 @@ def get_files(self): 'stdlib_stdexcept.cpp', 'stdlib_typeinfo.cpp', 'private_typeinfo.cpp', - 'format_exception.cpp', + 'cxa_exception_emscripten.cpp', ] if self.eh_mode == Exceptions.NONE: filenames += ['cxa_noexception.cpp']