Skip to content

Commit 1c55135

Browse files
committed
Adding compatibility versions for 5.6
5.6 corresponds with: 5.6: macOS 12.3, iOS 15.4, watchOS 8.5, tvOS 15.4
1 parent a7806db commit 1c55135

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

lib/Basic/Platform.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,9 @@ swift::getSwiftRuntimeCompatibilityVersionForTarget(
431431

432432
return floorFor64(llvm::VersionTuple(5, 4));
433433
} else if (Major == 12) {
434-
return floorFor64(llvm::VersionTuple(5, 5));
434+
if (Minor <= 2)
435+
return floorFor64(llvm::VersionTuple(5, 5));
436+
return floorFor64(llvm::VersionTuple(5, 6));
435437
}
436438
} else if (Triple.isiOS()) { // includes tvOS
437439
llvm::VersionTuple OSVersion = Triple.getiOSVersion();
@@ -467,7 +469,9 @@ swift::getSwiftRuntimeCompatibilityVersionForTarget(
467469

468470
return floorForArchitecture(llvm::VersionTuple(5, 4));
469471
} else if (Major <= 15) {
470-
return floorForArchitecture(llvm::VersionTuple(5, 5));
472+
if (Minor <= 3)
473+
return floorForArchitecture(llvm::VersionTuple(5, 5));
474+
return floorForArchitecture(llvm::VersionTuple(5, 6));
471475
}
472476
} else if (Triple.isWatchOS()) {
473477
llvm::VersionTuple OSVersion = Triple.getWatchOSVersion();
@@ -494,7 +498,9 @@ swift::getSwiftRuntimeCompatibilityVersionForTarget(
494498

495499
return floorFor64bits(llvm::VersionTuple(5, 4));
496500
} else if (Major <= 8) {
497-
return floorFor64bits(llvm::VersionTuple(5, 5));
501+
if (Minor <= 4)
502+
return floorFor64bits(llvm::VersionTuple(5, 5));
503+
return floorFor64bits(llvm::VersionTuple(5, 6));
498504
}
499505
}
500506

0 commit comments

Comments
 (0)