Skip to content

Remove the #include <setjmp.h> from _CStdlib.h #873

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

It seems like we don't use neither setjmp nor longjmp in the Foundation codebase, so we can safely remove this include.
The main motivation for this change is to fix the build with the latest wasi-libc version. Recent wasi-libc versions started to provide setjmp.h header but it raises compilation errors unless Exception Handling feature (still under standardization process) is enabled.

See https://github.com/WebAssembly/wasi-libc/blob/wasi-sdk-22/libc-top-half/musl/include/setjmp.h

It seems like we don't use neither setjmp nor longjmp in the Foundation
codebase, so we can safely remove this include.
The main motivation for this change is to fix the build with the latest
wasi-libc version. Recent wasi-libc versions started to provide
`setjmp.h` header but it raises compilation errors unless Exception
Handling feature (still under standardization process) is enabled.

See https://github.com/WebAssembly/wasi-libc/blob/wasi-sdk-22/libc-top-half/musl/include/setjmp.h
@kateinoigakukun
Copy link
Member Author

@swift-ci test

@jmschonfeld jmschonfeld merged commit 586c460 into swiftlang:main Aug 19, 2024
3 checks passed
cthielen pushed a commit to cthielen/swift-foundation that referenced this pull request Nov 8, 2024
It seems like we don't use neither setjmp nor longjmp in the Foundation
codebase, so we can safely remove this include.
The main motivation for this change is to fix the build with the latest
wasi-libc version. Recent wasi-libc versions started to provide
`setjmp.h` header but it raises compilation errors unless Exception
Handling feature (still under standardization process) is enabled.

See https://github.com/WebAssembly/wasi-libc/blob/wasi-sdk-22/libc-top-half/musl/include/setjmp.h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants