Open grynspan opened 6 months ago
cc @kateinoigakukun
We might need to re-consider https://github.com/apple/swift/pull/31692
I'm curious if @al45tair has seen this with Musl previously?
Is it just a matter of adding a mapping here? https://github.com/apple/swift/blob/main/lib/ClangImporter/MappedTypes.def#L131
That's what my previous attempt to fix it was about https://github.com/apple/swift/pull/31692/files#diff-794a8ab7c1a5c80032405934f97c0e1e0d6b6acabd9a308c61c4dbd563dff48d. But I couldn't get the test passing on x86_64 macOS, even though it passed on all other platforms.
Looks like the runs have been purged from CI… might be worth trying again just to get an up-to-date CI failure.
I'm curious if @al45tair has seen this with Musl previously?
I haven't, but then I haven't really tried using C varargs functions and I would imagine there isn't that much Swift code out there that does. It's entirely possible that this is broken in the fully static SDK too.
I worked around the issue in my case, but it'd be nice to not have to.
@grynspan How did you work around the issue?
Our particular use case was for custom formatting of time intervals as strings, so we just used String(describing:)
instead and traded the custom format for the default one on WASI. This is probably not a general solution.
Description
swift-testing uses
withVaList(_:)
in one spot and, when building for WASI/Wasm, runs into this error:Looks like either
CVaListPointer
is typealiased incorrectly or needs to be implemented.Reproduction
Try to build the following code for WASI/Wasm:
Expected behavior
Prints
123
.Environment
SwiftWasm Swift version 5.10-dev (LLVM 5dc9d563e5a6cd2, Swift 3aaeb1a91e1c0a5) Target: arm64-apple-darwin23.4.0
Additional information
No response