Merge remote-tracking branch 'origin/main' into rebranch

This commit is contained in:
swift-ci
2021-09-02 11:56:28 -07:00
6 changed files with 65 additions and 28 deletions

View File

@@ -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.