-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
[cxx-interop] Do not emit C++ interop flag in textual interfaces #77754
base: main
Are you sure you want to change the base?
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 |
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
2ad47af
to
a273999
Compare
Please test with following PR: @swift-ci please test |
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