Skip to content

[6.0][wasm] Cherry-pick errno platform overlay fixes #75798

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

kateinoigakukun
Copy link
Member

We provide shims for errno constants in WASILibc overlay since
wasi-libc's errno.h defines those constants in a way that cannot be
imported by ClangImporter.
However, some errno constants are aliased in wasi-libc, and we didn't
provided shims for them. This patch adds those missing shims.
This commit fixes an ambiguous `errno` error when importing WASILibc
module and SwiftWASILibc Clang module.

The error is caused by the fact that we define a shim for `errno` in
`Platform.swift` file, but wasi-libc defines `errno` in a way
ClangImporter can understand. We don't need to define shims for it,
otherwise we get two candidates for `errno` identifier.
@kateinoigakukun
Copy link
Member Author

@swift-ci test

@MaxDesiatov MaxDesiatov requested a review from bnbarham August 9, 2024 09:16
@kateinoigakukun kateinoigakukun marked this pull request as ready for review August 9, 2024 17:20
@kateinoigakukun kateinoigakukun requested a review from a team as a code owner August 9, 2024 17:20
@MaxDesiatov MaxDesiatov added WebAssembly Platform: WebAssembly WASI WebAssembly System Interface support Foundation swift 6.0 labels Aug 9, 2024
@kateinoigakukun kateinoigakukun merged commit 629aa83 into swiftlang:release/6.0 Aug 9, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Foundation swift 6.0 WASI WebAssembly System Interface support WebAssembly Platform: WebAssembly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants