-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[cxx-interop] Do not emit C++ interop flag in textual interfaces #77754
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
@swift-ci please test |
It makes sense to me that when Cxx interop is an implementation detail of a module, but not used in its interface, that the flag should be hidden to avoid affecting the mode in which downstream dependencies are compiled with respect to the client. What about when the interface does depend on Cxx interop, though? |
I have not read Allan's comment before reviewing.
This change is a counterpart of swiftlang/swift#77754. rdar://140203932
If the The user-facing message isn't ideal, it could explicitly mention the fix of adding the missing flag – we should improve that in the future. |
This change is a counterpart of swiftlang/swift#77754. rdar://140203932
@swift-ci please test with following PR: |
Ok, yeah I'd like to see something like that in the future to make failures to build textual interfaces more explainable and debuggable. For example, we could require that owners of libraries that emit textual interfaces which externally depend on Cxx interop specify a new flag that does get printed in the interface that causes client builds to fail fast if they do not enable interop themselves. The module interface verification build task should be able to diagnose whether this new flag is needed for the library owner. |
Please test with following PR: @swift-ci please test |
be4698f
to
18d9766
Compare
Please test with following PR: @swift-ci please test |
18d9766
to
2ad47af
Compare
Please test with following PR: @swift-ci please test |
2ad47af
to
a273999
Compare
3876783
to
f2fbfaa
Compare
26ff7fd
to
bc35e93
Compare
2736c8c
to
b8e641e
Compare
b8e641e
to
b760177
Compare
Please test with following PR: @swift-ci please test |
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.
LGTM!
This makes sure that the compiler does not emit `-enable-experimental-cxx-interop`/`-cxx-interoperability-mode` flags in `.swiftinterface` files. Those flags were breaking explicit module builds. The module can still be rebuilt from its textual interface if C++ interop was enabled in the current compilation. rdar://140203932
b760177
to
7ae2beb
Compare
Please test with following PR: @swift-ci please smoke test |
This change is a counterpart of swiftlang/swift#77754. rdar://140203932 (cherry picked from commit 04d3e8f)
Please test with following PR: @swift-ci please smoke test Linux |
2 similar comments
Please test with following PR: @swift-ci please smoke test Linux |
Please test with following PR: @swift-ci please smoke test Linux |
Please test with following PR: @swift-ci please smoke test macOS |
This makes sure that the compiler does not emit
-enable-experimental-cxx-interop
/-cxx-interoperability-mode
flags in.swiftinterface
files. Those flags were breaking explicit module builds. The module can still be rebuilt from its textual interface if C++ interop was enabled in the current compilation.rdar://140203932