After I tried updating this PR to LLVM 18 I ran into an issue struct sigaction being an incomplete type...
This would also depend on WebAssembly/exception-handling#179, because jmp_buf seems to be missing. Alternatively it is possible to disable any sigaction types and setjmp/jmp_buf from being referenced in LLVM but that's not a permanent solution and it won't get merged upstream.