[clang] [CodeGen][ObjC] Initial WebAssembly Support for GNUstep (PR #169043)

Derek Schuff via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 5 14:58:15 PST 2025


dschuff wrote:

+cc @sbc100 about issue 1 and @aheejin about issue 2.

Pardon my ignorance about objc here... When you say "explicitly hidden" what do you mean exactly? Do you mean something like `__attribute__((visibility("hidden"))`? 

On exception handling, I took a quick look at the IR output of your example. The cc1 command includes
`-target-feature +exception-handling -target-feature +multivalue -target-feature +reference-types -exception-model=wasm -mllvm -wasm-enable-eh -fobjc-exceptions -fexceptions  -mllvm -wasm-enable-sjlj -mllvm -wasm-use-legacy-eh` which looks approximately right. The IR output uses the `@__gnustep_objc_personality_v0` and uses objc exception runtime functions including `@objc_begin_catch(ptr %exn)`. Probably the exception handling ABI for objc is going to have to be tuned the way the libc++ EH ABI was, which will probably take some small tweaks in the frontend to have the same behavior, and some larger tweaks in the runtime, as there was with libc++ and libc++abi.
I believe all of our wasm-specific change to the EH runtime have been upstreamed by @aheejin so you can take a look at the wasm-specific code there to get an idea of what it would take for objc.

https://github.com/llvm/llvm-project/pull/169043


More information about the cfe-commits mailing list