Triple: bring OS version mapping up to date#2153
Conversation
nkcsgexi
commented
Jun 11, 2026
- Map darwin25-26 → macOS 26-27 and align darwin27+
- llvm side PR: [clang][Darwin] Canonicalize DriverKit platform between DriverKit 26<->27 llvm/llvm-project#202690
- Fix OS triple version mapping for the 26-aligned releases
rdar://177999453
|
@swift-ci please test |
|
@swift-ci please test |
|
@swift-ci please test |
| #expect(iOSVersion("arm64-apple-ios19.0") == Triple.Version(26, 0, 0)) | ||
| #expect(iOSVersion("arm64-apple-ios26.0") == Triple.Version(26, 0, 0)) | ||
| #expect(iOSVersion("arm64-apple-ios18.0") == Triple.Version(18, 0, 0)) | ||
| #expect(iOSVersion("arm64-apple-ios21.0") == Triple.Version(28, 0, 0)) |
There was a problem hiding this comment.
Is this really the right behavior? If I pass arm64-apple-ios20.0 to clang, it errors out completely, rather than transforming it to an iOS 27 triple.
There was a problem hiding this comment.
I believe it's better to translate these versions mechanically at the driver layer because the compiler will eventually diagnose them anyway.
There was a problem hiding this comment.
Additionally, there doesn't seem to be a great diagnostic engine at this layer in the driver that allows us to emit good diagnostics.
There was a problem hiding this comment.
Probably another option is to keep the version as is if they fall into the invalid gap so that Swift and Clang can later diagnose. hmm
Rewrite `_iOSVersion` along the lines of LLVM's `getiOSVersion` for the version-26 alignment: iOS & tvOS 19 -> 26, xrOS 1/2 -> iOS 17/18, xrOS 3 -> 26, watchOS 12 -> 26. Unlike LLVM, only the last pre-jump release canonicalizes to 26; versions in the unshipped gap below 26 are left unchanged rather than bumped into the 26+ space.
|
@swift-ci please test |
|
@swift-ci please test Windows |
|
@swift-ci please test Windows |
1 similar comment
|
@swift-ci please test Windows |