-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[ModuleInterfaces] Combine the normalized target triple into the cache hash #27469
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
a2b3bbf
to
dea6d75
Compare
dea6d75
to
7329481
Compare
@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.
Found a typo in a comment, and I'm not sure the behavior will be correct for Android targets, but otherwise LGTM.
// across targets. Note that we this normalization explicitly doesn't | ||
// include the minimum deployment target (e.g. the '12.0' in 'ios12.0'). | ||
auto normalizedTargetTriple = | ||
getTargetSpecificModuleTriple(SubInvocation.getLangOptions().Target); |
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.
@compnerd I notice that Android drops the API version when it normalizes the target triple. Will that behavior be appropriate here?
Build failed |
Build failed |
…e hash Previously, we'd combine just the target architecture, and rely on the fact that the .swiftinterface is in a reasonably-target-specific subdirectory to include enough entropy to avoid hash collisions. But in the presence of a VFS or if two targets are sharing the same .swiftinterface file (which can sometimes happen in tests), they will collide since the hash only includes architecture. Instead, use the same normalization that the serialized module loader uses, and serialize the normalized target triple instead. Fixes rdar://55881335
7329481
to
c090816
Compare
@swift-ci please test |
Build failed |
Build failed |
LLDB failure is unrelated @swift-ci please test Linux |
Previously, we'd combine just the target architecture, and rely on the
fact that the .swiftinterface is in a reasonably-target-specific
subdirectory to include enough entropy to avoid hash collisions. But in
the presence of a VFS or if two targets are sharing the same
.swiftinterface file (which can sometimes happen in tests), they will
collide since the hash only includes architecture.
Instead, use the same normalization that the serialized module loader
uses, and serialize the normalized target triple instead.
Fixes rdar://55881335