swiftwasm / swift

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

wasm-5.9.1-release Compile error #5564

Closed bestwnh closed 5 months ago

bestwnh commented 5 months ago

test.zip Here is a test project to reproduce the error. There is a CSSStyle.swift file in the project, and there are two enum CSSColor in the file, you can comment one of them. If you use the first one, the carton bundle failed. If you use the second one, the carton bundle build success. They all work fine with the wasm-5.8.0-release. image

kateinoigakukun commented 5 months ago

The crash here is caused by wrong debug info generation by swiftc. I guess there were some issues on 32bit archs. It seems like the crash has been fixed in 5.10 release snapshot.

If you need to get it work with 5.9 toolchain and you don't need debug info for release build, carton bundle -Xswiftc -gnone would be a workaround for you.

bestwnh commented 5 months ago

Thanks, the work around is working for me. Can't wait for the 5.10-release come out.