Skip to content

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
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