-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Export libc++ exceptions #5390
Export libc++ exceptions #5390
Conversation
7e27da3
to
e92dd74
Compare
8e3fa6e
to
549c343
Compare
This seems to fix an
I'm too rushed to look carefully, but that looks good? Did you mean to (also) remove |
@rwgk I have no emscripten env, but I tested on Apple Silicon and it worked. Therefore I removed the MacOS+CPython case. |
We have the Could you please remove |
19d43f4
to
b3c2fb5
Compare
@rwgk Removed |
b95db5d
to
101a786
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for discovering and fixing this bug!
Description
Before this PR, exception translation was still failing on libc++. The failure reason is the visibility of exceptions, which was already discovered in #2999 and reverted by #4324. This PR fixes it by detecting libc++ using the _LIBCPP_EXCEPTION macro and setting PYBIND11_EXPORT_EXCEPTION accordingly. The macro definition is moved below other C++ header inclusion to make sure that _LIBCPP_EXCEPTION is defined.
Suggested changelog entry:
``pybind11::builtin_exception`` is now explicitly exported when linked to libc++.