mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Frontend: Replace the abi magic value accepted by -target-min-inlining-version with a min magic value instead. The new value corresponds to the OS versions in which Swift was introduced. The introduction OS is a better floor for availability checking than the OS in which Swift became ABI stable because inlinable functions may reference clang declarations which have availability between Swift's introduction and ABI stability and framework developers ought to get diagnostics for unguarded use of those APIs in inlinable code.
This commit is contained in:
@@ -80,15 +80,20 @@ bool swift::triplesAreValidForZippering(const llvm::Triple &target,
|
||||
}
|
||||
|
||||
const Optional<llvm::VersionTuple>
|
||||
swift::minimumABIStableOSVersionForTriple(const llvm::Triple &triple) {
|
||||
swift::minimumAvailableOSVersionForTriple(const llvm::Triple &triple) {
|
||||
if (triple.isMacOSX())
|
||||
return llvm::VersionTuple(10, 14, 4);
|
||||
return llvm::VersionTuple(10, 10, 0);
|
||||
|
||||
if (triple.isiOS() /* including tvOS */)
|
||||
return llvm::VersionTuple(12, 2);
|
||||
// Note: this must come before checking iOS since that returns true for
|
||||
// both iOS and tvOS.
|
||||
if (triple.isTvOS())
|
||||
return llvm::VersionTuple(9, 0);
|
||||
|
||||
if (triple.isiOS())
|
||||
return llvm::VersionTuple(8, 0);
|
||||
|
||||
if (triple.isWatchOS())
|
||||
return llvm::VersionTuple(5, 2);
|
||||
return llvm::VersionTuple(2, 0);
|
||||
|
||||
return None;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user