Skip to content

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

Merged
merged 11 commits into from
Jul 9, 2020

Conversation

martinboehme
Copy link
Contributor

@martinboehme martinboehme commented Apr 9, 2020

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

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.
@martinboehme
Copy link
Contributor Author

@compnerd I'd like your opinion on this in particular as you switched from clang++ (even without C++ interop enabled) to clang in #26110.

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.
@martinboehme
Copy link
Contributor Author

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.

@martinboehme
Copy link
Contributor Author

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

@swiftlang swiftlang deleted a comment from swift-ci Apr 24, 2020
@swiftlang swiftlang deleted a comment from swift-ci Apr 24, 2020
@gribozavr gribozavr added the c++ interop Feature: Interoperability with C++ label Apr 24, 2020
@martinboehme

This comment has been minimized.

@martinboehme

This comment has been minimized.

@martinboehme

This comment has been minimized.

Copy link
Member

@compnerd compnerd left a 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.

@swiftlang swiftlang deleted a comment from swift-ci May 15, 2020
@swiftlang swiftlang deleted a comment from swift-ci May 15, 2020
@MForster
Copy link
Contributor

MForster commented Jul 7, 2020

@swift-ci Please test

@MForster
Copy link
Contributor

MForster commented Jul 7, 2020

Please add a test case to ensure that msvcprt demonstrating can be used by default on Windows.

I've filed SR-13164 for this:

@swiftlang swiftlang deleted a comment from swift-ci Jul 7, 2020
@swiftlang swiftlang deleted a comment from swift-ci Jul 8, 2020
@swift-ci
Copy link
Contributor

swift-ci commented Jul 8, 2020

Build failed
Swift Test OS X Platform
Git Sha - 541b2ef

This is necessary after commit
1be17a2
@MForster
Copy link
Contributor

MForster commented Jul 9, 2020

@swift-ci Please test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ interop Feature: Interoperability with C++
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants