mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge remote-tracking branch 'origin/main' into rebranch
This commit is contained in:
@@ -79,19 +79,25 @@ bool swift::triplesAreValidForZippering(const llvm::Triple &target,
|
||||
return false;
|
||||
}
|
||||
|
||||
bool swift::tripleRequiresRPathForSwiftInOS(const llvm::Triple &triple) {
|
||||
bool swift::tripleRequiresRPathForSwiftLibrariesInOS(
|
||||
const llvm::Triple &triple) {
|
||||
if (triple.isMacOSX()) {
|
||||
// macOS 10.14.4 contains a copy of Swift, but the linker will still use an
|
||||
// rpath-based install name until 10.15.
|
||||
return triple.isMacOSXVersionLT(10, 15);
|
||||
// macOS versions before 10.14.4 don't have Swift in the OS
|
||||
// (the linker still uses an rpath-based install name until 10.15).
|
||||
// macOS versions before 12.0 don't have _Concurrency in the OS.
|
||||
return triple.isMacOSXVersionLT(12, 0);
|
||||
}
|
||||
|
||||
if (triple.isiOS()) {
|
||||
return triple.isOSVersionLT(12, 2);
|
||||
// iOS versions before 12.2 don't have Swift in the OS.
|
||||
// iOS versions before 15.0 don't have _Concurrency in the OS.
|
||||
return triple.isOSVersionLT(15, 0);
|
||||
}
|
||||
|
||||
if (triple.isWatchOS()) {
|
||||
return triple.isOSVersionLT(5, 2);
|
||||
// watchOS versions before 5.2 don't have Swift in the OS.
|
||||
// watchOS versions before 8.0 don't have _Concurrency in the OS.
|
||||
return triple.isOSVersionLT(8, 0);
|
||||
}
|
||||
|
||||
// Other platforms don't have Swift installed as part of the OS by default.
|
||||
|
||||
Reference in New Issue
Block a user