-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[cxx-interop] Do not install binary .swiftmodule
files for the overlays
#81408
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 smoke 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
CC: @etcwilde |
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.
Swift interfaces are only valid when library evolution is enabled. The platforms that do not have ABI stability do not have library evolution enabled, and so must use the binary swift module. We will need to continue installing the module on those platforms until they either have library evolution enabled or the textual interfaces are able to describe the layout of structs.
@etcwilde Is it the new build system that doesn't enable library-evolution on Windows? In the log above I see the swiftinterface being installed to |
AFAIK, library evolution is not enabled on Windows (unless someone changed the default underneath us). The old build system does emit the swift interface (and it is being shipped). The new build system implementation ties it explicitly to the library evolution mode, and I don't think that we should be enabling that on Windows currently. |
…lays This fixes a deserialization failure in the compiler that occurred while loading the CxxStdlib overlay module: ``` Cross-reference to module 'Swift' ... Optional ... some ... with type <τ_0_0 where τ_0_0 : ~Copyable, τ_0_0 : ~Escapable> (Optional<τ_0_0>.Type) -> (τ_0_0) -> Optional<τ_0_0> ``` This was happening because the overlays were built against a different version of the Swift stdlib than is being used. The compiler is able to rebuild the Cxx and CxxStdlib modules from their textual interfaces. Let's use that feature unconditionally in production toolchains to avoid this kind of binary incompatibilities. rdar://150416863
4c954fe
to
16b2808
Compare
@swift-ci please smoke test |
@swift-ci please build toolchain macOS |
@swift-ci please test Windows |
Oops, forgot to disable the auto-merger on this one... Happy to address any feedback post-merge. |
…o-not-install-swiftmodules" This reverts commit ede6e46.
This fixes a deserialization failure in the compiler that occurred while loading the CxxStdlib overlay module:
This was happening because the overlays were built against a different version of the Swift stdlib than is being used. The compiler is able to rebuild the Cxx and CxxStdlib modules from their textual interfaces. Let's use that feature unconditionally in production toolchains to avoid this kind of binary incompatibilities.
rdar://150416863