Skip to content

Commit c67a76f

Browse files
committed
Remove previous isRuntimeCompatible implementation
1 parent d63a94e commit c67a76f

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

Sources/Basics/Triple+Basics.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,6 @@ extension Triple {
116116
)
117117
}
118118
}
119-
120-
public func isRuntimeCompatible(with triple: Triple) -> Bool {
121-
guard self.isMacOSX, let version = self._macOSVersion, let comparedVersion = triple._macOSVersion else {
122-
return self.tripleString == triple.tripleString
123-
}
124-
125-
return version >= comparedVersion
126-
}
127119
}
128120

129121
extension Triple {

Sources/PackageModel/SwiftSDKBundle.swift

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,8 +428,17 @@ extension [SwiftSDKBundle] {
428428
for bundle in self {
429429
for (artifactID, variants) in bundle.artifacts {
430430
for variant in variants {
431-
guard variant.metadata.supportedTriples.contains(where: {
432-
hostTriple.isRuntimeCompatible(with: $0)
431+
guard variant.metadata.supportedTriples.contains(where: { variantTriple in
432+
if
433+
hostTriple.arch == variantTriple.arch &&
434+
hostTriple.vendor == variantTriple.vendor &&
435+
hostTriple.os == variantTriple.os &&
436+
hostTriple.environment == variantTriple.environment
437+
{
438+
return hostTriple.osVersion >= variantTriple.osVersion
439+
} else {
440+
return false
441+
}
433442
}) else {
434443
continue
435444
}

0 commit comments

Comments
 (0)