aheejin wrote: @HendrikHuebner > I don't understand why we need `_Unwind_CallPersonality` in the first place, > since all it does at the moment is delegating to the (hardcoded) personality > function and resetting the selector (Which could also be done inside the > personality function). There needs to be more flexibility in the ABI to have > different personality functions.
It's a long ago, but I think I made it that way in order to minimize the changes to libc++ so that we share most of the code with the other platforms. Also the intention was to hide Wasm-specific low-level details in libunwind, such as the [use](https://github.com/llvm/llvm-project/blob/f440b5c12df500f86f9407e625d42f92913e8367/libunwind/src/Unwind-wasm.c#L27-L38) of the variable `__wasm_lpad_context` or [calling](https://github.com/llvm/llvm-project/blob/f440b5c12df500f86f9407e625d42f92913e8367/libunwind/src/Unwind-wasm.c#L69) builtins for Wasm instructions. > @dschuff Do you think an ABI break involving `_Unwind_CallPersonality` would > still be tolerable at this stage, such as changing the signature or just > avoiding it all together and directly emitting a call to the personality > function? It's more of our convention than ABI, so I don't think it's doable if we really need to, but for our libraries I think the current code works fine. You can either 1. Modify WasmEHPrepare to generate calls to your personality function in case of ObjC, or 2. Create `_Unwind_CallPersonality` wrapper in your library too If 2 is not too much burden, I think it would help make WasmEHPrepare simpler. https://github.com/llvm/llvm-project/pull/169043 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
