@@ -27,7 +27,8 @@ public struct Triple: Encodable, Equatable {
27
27
public let vendor : Vendor
28
28
public let os : OS
29
29
public let abi : ABI
30
- public let version : String ?
30
+ public let osVersion : String ?
31
+ public let abiVersion : String ?
31
32
32
33
public enum Error : Swift . Error {
33
34
case badFormat
@@ -84,16 +85,18 @@ public struct Triple: Encodable, Equatable {
84
85
throw Error . unknownOS
85
86
}
86
87
87
- let version = Triple . parseVersion ( components [ 2 ] )
88
+ let osVersion = Triple . parseVersion ( components [ 2 ] )
88
89
89
90
let abi = components. count > 3 ? Triple . parseABI ( components [ 3 ] ) : nil
91
+ let abiVersion = components. count > 3 ? Triple . parseVersion ( components [ 3 ] ) : nil
90
92
91
93
self . tripleString = string
92
94
self . arch = arch
93
95
self . vendor = vendor
94
96
self . os = os
95
- self . version = version
97
+ self . osVersion = osVersion
96
98
self . abi = abi ?? . unknown
99
+ self . abiVersion = abiVersion
97
100
}
98
101
99
102
fileprivate static func parseOS( _ string: String ) -> OS ? {
@@ -145,7 +148,7 @@ public struct Triple: Encodable, Equatable {
145
148
/// This is currently meant for Apple platforms only.
146
149
public func tripleString( forPlatformVersion version: String ) -> String {
147
150
precondition ( isDarwin ( ) )
148
- return String ( self . tripleString. dropLast ( self . version ? . count ?? 0 ) ) + version
151
+ return String ( self . tripleString. dropLast ( self . osVersion ? . count ?? 0 ) ) + version
149
152
}
150
153
151
154
public static let macOS = try ! Triple ( " x86_64-apple-macosx " )
0 commit comments