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
Fix backward compatibility in host triple checks #6819
Conversation
@swift-ci smoke test |
@swift-ci smoke test |
@swift-ci test windows |
return hostTriple.osVersion >= variantTriple.osVersion | ||
} else { | ||
return false | ||
} |
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.
I've inlined this check just in SwiftSDKBundle.swift
and rewrote it so that it doesn't depend on vendored Triple
API and can be easily backported to 5.9.
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.
Seems fine for 5.9, but we shouldn't land it like this in main
IMO
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.
WDYT of the previous isRuntimeCompatible
name for a function to refactor this into?
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.
This is the naming I'm using after all in the latest commit.
@swift-ci smoke test |
@swift-ci test windows |
1 similar comment
@swift-ci test windows |
It's useful to be able to set host triple in Swift SDKs to `arm64-apple-macosx13.0` to allow cross-compiling from an older version of macOS. This triple is not recognized as directly matching `arm64-apple-macosx14.0` on a newer version of macOS. We should support backward compatibility with Swift SDKs that were built for older version of macOS.
@swift-ci test |
c67a76f
to
2fa29e7
Compare
@swift-ci test |
This looks reasonable to me, though again I would love to see Triple moved to a distinct target shared between driver and pm |
@swift-ci test windows |
@swift-ci test |
Cherry-pick of #6819. When setting host triple in Swift SDKs to `arm64-apple-macosx13.0` to allow cross-compiling from an older version of macOS, this triple is not recognized as directly matching `arm64-apple-macosx14.0` on a newer version of macOS. We should support backward compatibility with Swift SDKs that were built for older version of macOS. Resolves rdar://113967401. ``` # Conflicts: # Sources/PackageModel/SwiftSDKBundle.swift ```
@swift-ci test windows |
1 similar comment
@swift-ci test windows |
@swift-ci test |
@swift-ci test windows |
Cherry-pick of #6819. When setting host triple in Swift SDKs to `arm64-apple-macosx13.0` to allow cross-compiling from an older version of macOS, this triple is not recognized as directly matching `arm64-apple-macosx14.0` on a newer version of macOS. We should support backward compatibility with Swift SDKs that were built for older version of macOS. Resolves rdar://113967401. ``` # Conflicts: # Sources/PackageModel/SwiftSDKBundle.swift ```
Cherry-pick of #6819. When setting host triple in Swift SDKs to `arm64-apple-macosx13.0` to allow cross-compiling from an older version of macOS, this triple is not recognized as directly matching `arm64-apple-macosx14.0` on a newer version of macOS. We should support backward compatibility with Swift SDKs that were built for older version of macOS. Resolves rdar://113967401. ``` # Conflicts: # Sources/PackageModel/SwiftSDKBundle.swift ```
When setting host triple in Swift SDKs to `arm64-apple-macosx13.0` to allow cross-compiling from an older version of macOS, this triple is not recognized as directly matching `arm64-apple-macosx14.0` on a newer version of macOS. We should support backward compatibility with Swift SDKs that were built for older version of macOS. Resolves rdar://113967401.
When setting host triple in Swift SDKs to `arm64-apple-macosx13.0` to allow cross-compiling from an older version of macOS, this triple is not recognized as directly matching `arm64-apple-macosx14.0` on a newer version of macOS. We should support backward compatibility with Swift SDKs that were built for older version of macOS. Resolves rdar://113967401.
When setting host triple in Swift SDKs to
arm64-apple-macosx13.0
to allow cross-compiling from an older version of macOS, this triple is not recognized as directly matchingarm64-apple-macosx14.0
on a newer version of macOS.We should support backward compatibility with Swift SDKs that were built for older version of macOS.
Resolves rdar://113967401.