Skip to content

[cxx-interop] start emitting a unified header file for a Swift module #41831

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 2 commits into from
Mar 17, 2022

Conversation

hyp
Copy link
Contributor

@hyp hyp commented Mar 16, 2022

This change removes the -emit-cxx-header option, and adds a new -emit-clang-header-path option instead. It's aliased to -emit-objc-header-path for now. In the future -emit-objc-header-path will alias to it. After this change Swift can start emitting a single header file that can be expose declarations to C, Objective-C, or C++. For now C++ interface is generated (for all public decls) only when -enable-cxx-interop flag is passed, but that behavior will change once @expose attribute is supported.

@hyp
Copy link
Contributor Author

hyp commented Mar 16, 2022

@swift-ci please test

Copy link
Contributor

@egorzhdan egorzhdan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

This change removes the -emit-cxx-header option, and adds a new -emit-clang-header-path option instead. It's aliased to -emit-objc-header-path for now, but in the future, -emit-objc-header-path will alias to it. After this change Swift can start emitting a single header file that can be expose declarations to C, Objective-C, or C++. For now C++ interface is generated (for all public decls) only when -enable-cxx-interop flag is passed, but that behavior will change once  attribute is supported.
@hyp
Copy link
Contributor Author

hyp commented Mar 17, 2022

@swift-ci please test

@hyp hyp merged commit cd93d23 into swiftlang:main Mar 17, 2022
hyp added a commit to hyp/swift that referenced this pull request Mar 18, 2022
This reverts commit cd93d23, reversing
changes made to f9f5476.
gottesmm added a commit that referenced this pull request Mar 18, 2022
Revert "Merge pull request #41831 from hyp/unify-header"
hyp added a commit to hyp/swift that referenced this pull request Mar 19, 2022
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