-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Link against the C++ standard library when C++ interop is enabled #30914
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
This doesn't yet allow including C++ headers on platforms where libc++ isn't the default; see comments in UnixToolChains.cpp for details. However, it does, for example, allow throwing and catching exceptions in C++ code used through interop, unblocking https://github.com/apple/swift/pull/30674/files.
@compnerd I'd like your opinion on this in particular as you switched from I think this addresses all of the issues you raise in the code comments. I've rewritten the comment to reflect what the reality is now, but let me know if you think there's more I should add. |
The flags (-enable-experimental-cxx-interop and -experimental-cxx-stdlib) carry "experimental" in the name to emphasize that C++ interop is still an experimental feature.
5168289
to
c0fd5d7
Compare
I've added a commit that adds experimental driver flags for C++ interop. I think this addresses some of the issues raised -- I'll respond to specific comments in a moment. |
@compnerd Your rewiew state is showing as "Changes requested", but I can't get github to show me those changes. Maybe those requested changes were for an outdated part of the PR? Anything else that should be changed before this PR is ready to be merged? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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.
Please add a test case to ensure that msvcprt demonstrating can be used by default on Windows.
@swift-ci Please test |
I've filed SR-13164 for this: |
Build failed |
This is necessary after commit 1be17a2
@swift-ci Please test |
…er-var.swift. swiftlang#30914 has been merged so this part of the test can be enabled.
This doesn't yet allow including C++ headers on platforms where libc++ isn't the default; see comments in UnixToolChains.cpp for details.
However, it does, for example, allow throwing and catching exceptions in C++ code used through interop, unblocking #30674.
Part of SR-12469