Skip to content

[5.0] [Serialization] Use full target architectures for swiftmodule files #21096

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

Conversation

jrose-apple
Copy link
Contributor

  • Explanation: Swiftmodules in frameworks are stored under the name of their "major architecture" (the name used by #if arch(…)), but that creates complications for platforms that have more than one architecture variant per major architecture, like armv7 and armv7s, even if the content is "the same".

  • Scope: In practice, only affects how the compiler imports frameworks, which only Xcode builds.

  • Issue: rdar://problem/45174692

  • Risk: Low. This change is backwards-compatible for all shipping Apple platforms, and non-Apple platforms don't use multi-architecture Swift modules.

  • Testing: Passed regression tests and the source compat suite.

  • Reviewed by: @rjmccall, @jakepetroules

@jrose-apple jrose-apple requested a review from a team as a code owner December 6, 2018 21:45
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

Copy link
Contributor

@AnnaZaks AnnaZaks left a comment

Choose a reason for hiding this comment

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

Approved to be merged once the tests pass.

@swift-ci
Copy link
Contributor

swift-ci commented Dec 6, 2018

Build failed
Swift Test Linux Platform
Git Sha - 8b3b79c597e6ce8172a677a003e047a3a021b69a

@swift-ci
Copy link
Contributor

swift-ci commented Dec 6, 2018

Build failed
Swift Test OS X Platform
Git Sha - 8b3b79c597e6ce8172a677a003e047a3a021b69a

…wiftlang#21053)

Previously these used the same "major architecture" names that the
`#if os(...)` query accepts, but that can be a problem when building
for, say, both armv7 and armv7s, even if the content is "the same".

For a transition period where external build tools are involved, the
compiler will look for "arm.swiftmodule" if it fails to find
"armv7.swiftmodule" or any other 32-bit ARM architecture. No other
Apple platform architectures are affected, and AFAIK no one's using
the architecture-based layout on Linux or any other platforms.

rdar://problem/45174692
(cherry picked from commit 06f3c11)
@jrose-apple
Copy link
Contributor Author

*sigh* Resolved the master/5.0 differences wrong.

@swift-ci Please test

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test source compatibility

@swift-ci
Copy link
Contributor

swift-ci commented Dec 6, 2018

Build failed
Swift Test Linux Platform
Git Sha - 8b3b79c597e6ce8172a677a003e047a3a021b69a

@swift-ci
Copy link
Contributor

swift-ci commented Dec 6, 2018

Build failed
Swift Test OS X Platform
Git Sha - 8b3b79c597e6ce8172a677a003e047a3a021b69a

@jrose-apple
Copy link
Contributor Author

Source compat failures are UPASSs; what's more, they're UPASSs in SwiftPM projects, which are not affected by this.

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.

3 participants