[EH] Deprecate EXPORT_EXCEPTION_HANDLING_HELPERS - #26499
Conversation
This effectively removes `EXPORT_EXCEPTION_HANDLING_HELPERS` setting. This marks the setting as deprecated not to crash users' builds right away in case they are using it. Even though it still exists as a deprecated setting, setting it to true will not change anything. It used to export `getExceptionMessage` and a few more functions (`in/decrementexceptionRefCount`), but after emscripten-core#26493, `getExceptionMessage` is exported anyway when exceptions are used and either `-sASSERTIONS` or `-sEXCEPTION_STACK_TRACES` is set, which are set by default at `-O0`. For Wasm EH, the dependency is automatically detected. For Emscripten EH, we had to add `getExceptionMessage` to deps of `__cxa_throw`. This adds `in/decrementexceptionRefCount` to deps of `__cxa_throw` (for Emscripten EH) and `__throw_exception_with_stack_trace` (for Wasm EH) and removes `EXPORT_EXCEPTION_HANDLING_HELPERS`. (You can use it but it won't do anything additionally)
|
This does not remove the setting not to crash users. When can we actually remove a setting? https://github.com/emscripten-core/emscripten/blob/main/tools/settings.py seems to say we can move deprecated settings to legacy settings later. Then do those settings live in the legacy settings forever? Or can we actually remove a setting some time after it's depcreated? |
The setting that go into LEGACY_SETTINGS basically stay there forever. You can choose the valid values in LEGACY_SETTINGS, for this settings if you specify |
I forgot to add this in #26499.
This effectively removes
EXPORT_EXCEPTION_HANDLING_HELPERSsetting. This marks the setting as deprecated not to crash users' builds right away in case they are using it. Even though it still exists as a deprecated setting, setting it to true will not change anything.It used to export
getExceptionMessageand a few more functions (in/decrementexceptionRefCount), but after #26493,getExceptionMessageis exported anyway when exceptions are used and either-sASSERTIONSor-sEXCEPTION_STACK_TRACESis set, which are set by default at-O0. For Wasm EH, the dependency is automatically detected. For Emscripten EH, we had to addgetExceptionMessageto deps of__cxa_throw.This adds
in/decrementexceptionRefCountto deps of__cxa_throw(for Emscripten EH) and__throw_exception_with_stack_trace(for Wasm EH) and removesEXPORT_EXCEPTION_HANDLING_HELPERS. (You can use it but it won't do anything additionally)