-
Notifications
You must be signed in to change notification settings - Fork 10.5k
runtime: add missing SWIFT_CC(swift)
for matching function signatures
#67644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
`test/stdlib/Runtime.swift.gyb` makes a call to this function with Swift calling convention, but the function is declared with C calling convention, which makes the compiled code invalid when targeting Wasm due to caller/callee signature mismatch. As `@_cdecl` doesn't support function declaration without a body on the Swift side, the only possible fix right now is to add the calling convention attribute on the C++ side.
@swift-ci test |
@swift-ci build toolchain |
preset=buildbot_incremental_linux_crosscompile_wasm |
SWIFT_CC(swift)
on swift_demangle
SWIFT_CC(swift)
for matching function signatures
…match `ContiguousArrayBuffer.swift` calls `swift_COWChecksEnabled` with Swift CC, but the functions is defined with C CC.
These functions are called throughout the codebase with `@_silgen_name`, which uses Swift calling convention, while they are actually defined with C calling convention.
@swift-ci build toolchain |
@swift-ci test |
preset=buildbot_incremental_linux_crosscompile_wasm |
cc @jckarter these are ABI breaks but not sure what the scope of these functions are |
Per a discussion with @al45tair maybe adding support for functions without bodies for |
Yeah, I've been wanting that feature for a while now 🙂 of course I'd love us to actually formalize |
Closing as superseded by #69207 |
test/stdlib/Runtime.swift.gyb
makes a call to this function with Swift calling convention, but the function is declared with C calling convention, which makes the compiled code invalid when targeting Wasm due to caller/callee signature mismatch.As
@_cdecl
doesn't support function declaration without a body on the Swift side, the only possible fix right now is to add the calling convention attribute on the C++ side.