Closed
Description
Using snapshot toolchains newer than 5.3.1 result in a compiler crash when building:
- A new empty package with
swift package init
- Adding Tokamak as a dendency.
/Library/Developer/Toolchains/swift-wasm-DEVELOPMENT-SNAPSHOT-2021-03-10-a.xctoolchain/usr/bin/swift build --triple wasm32-unknown-wasi -c release
Results in crash:
Incorrect number of arguments passed to called function!
call swiftcc void @"$s11TokamakCore17EnvironmentValuesV15foregroundColorAA0F0VSgvplACTK"(%T11TokamakCore5ColorVSg* noalias nocapture sret(%T11TokamakCore5ColorVSg) %0, %T11TokamakCore17EnvironmentValuesV* noalias nocapture dereferenceable(4) %1, i8* %2), !dbg !825
in function keypath_get
<unknown>:0: error: fatal error encountered during compilation; please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the project
<unknown>:0: note: Broken function found, compilation aborted!
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the project and the crash backtrace.
Stack dump:
0. Running pass 'Module Verifier' on function '@keypath_get'
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
Incorrect number of arguments passed to called function!
call swiftcc void @"$s11TokamakCore17EnvironmentValuesV18_defaultAppStorageAA01_G8Provider_pSgvplACTK"(%T11TokamakCore16_StorageProvider_pSg* noalias nocapture sret(%T11TokamakCore16_StorageProvider_pSg) %0, %T11TokamakCore17EnvironmentValuesV* noalias nocapture dereferenceable(4) %1, i8* %2), !dbg !1727
in function keypath_get
LLVM ERROR: Broken function found, compilation aborted!
- Similar results with older snapshot
swift-wasm-DEVELOPMENT-SNAPSHOT-2021-02-22-a
- Works with
swift-wasm-5.3.1-RELEASE
toolchain - Works if instead of Tokamak importing only JavaScriptKit for example
I could not get llvm-symbolizer (from built toolchain) to work...