-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
[wasm] Mark errno
as nonisolated(unsafe) in wasi-libc
#75821
[wasm] Mark errno
as nonisolated(unsafe) in wasi-libc
#75821
Conversation
…dule" This reverts commit 164ec0a.
@swift-ci test WebAssembly |
@swift-ci smoke test |
An alternative might be to do what every other platform does and wrap it with a Swift wrapper that calls some inline C functions that access |
You should be able to use API Notes to fix that already; if you mark the |
This patch adds an apinotes file for SwiftWASILibc clang module to mark `errno` macro hidden from Swift code. This resolves ambiguity between the C macro definition and the Swift wrapper in WASILibc overlay module. This change installs the apinotes file to the resource directories for both lib/swift/apinotes and lib/swift_static/apinotes.
1fa232d
to
be08ebb
Compare
Thanks @al45tair! |
@swift-ci smoke test |
@swift-ci test WebAssembly |
This patch is a workaround to reflect the fact that
errno
is thread-local and can be accessed from any actor. This is a temporary solution until we have__swift_attr__
support in apinotes orthread_local
support in ClangImporter.This change is required to build swift-corelibs-foundation with Swift 6 language mode.