WebAssembly + SwiftPM

Thanks for investigation!

Sorry, I forgot to set rpath for swift-build to find dynamic libraries relative to itself path. I fixed this issue in this PR [WASM] Pass -rpath flag to find dynamic library from relative to it's executable path by kateinoigakukun 路 Pull Request #374 路 swiftwasm/swift 路 GitHub

This crash is expected behavior because clang doesn't allow non-prototyped function definition without varargs. (But I know we should diagnose before crash :sweat_smile: )

After adding explicit void parameter to indicate that the helloC doesn't take any argument, building the target will be succeeded.

This explicit prototype declaration is necessary because WebAssembly requires that callee and caller signatures are same.

3 Likes