Avatar
omochimetaru 4/3/2024 5:40 AM
The reason why the linking is not supported on Wasm is we cannot rename entrypoint symbol by linker (wasm-ld): Stop renaming main symbol for WASI apple/swift-package-manager#3804 On other platforms, SwiftPM build .executableTarget targets with renaming main to {moduleName}_main to avoid conflicting with .testTarget's entrypoint at link-time. For non-testing build, SwiftPM renames the entrypoint back to main by linker option. However, wasm-ld doesn't have the option for now, so we disable the feature now.
(edited)
5:41 AM
う〜ん大変そう
5:43 AM
リンクはできても他にも暗黙の仮定が壊れたりしてマイナーな問題がありそう