swiftwasm / swift

WebAssembly support for the Swift programming language
https://swiftwasm.org
1.32k stars 28 forks source link

Cannot build with Cxx interop #4776

Open kerimcharfi opened 2 years ago

kerimcharfi commented 2 years ago

Describe the bug Cannot compile simple Cxx interop hello world project, when -target wasm32-unknown-wasi is set. This works: swiftc helloword.swift -o ubu.wasm -enable-experimental-cxx-interop -I ./helloCxx -Xfrontend -validate-tbd-against-ir=none This doesn't work: swiftc -target wasm32-unknown-wasi helloword.swift -o ubu.wasm -enable-experimental-cxx-interop -I ./helloCxx -Xfrontend -validate-tbd-against-ir=none

Screenshots

image

Environment (please fill out the following information)

kateinoigakukun commented 2 years ago

I haven't took a look on cxx interop yet but looks like wasi-libc violates some assumptions of cxx-interop