@@ -133,11 +133,6 @@ extension DarwinToolchain {
133
133
134
134
// Link compatibility libraries, if we're deploying back to OSes that
135
135
// have an older Swift runtime.
136
- let runtimeCompatibilityVersion : ( Int , Int ) ? =
137
- targetInfo. target. swiftRuntimeCompatibilityVersion. map {
138
- ( $0. major, $0. minor)
139
- }
140
-
141
136
let resourceDirPath = try computeResourceDirPath ( for: targetTriple,
142
137
parsedOptions: & parsedOptions,
143
138
isShared: true )
@@ -149,18 +144,18 @@ extension DarwinToolchain {
149
144
}
150
145
}
151
146
152
- if let compatibilityVersion = runtimeCompatibilityVersion {
153
- if compatibilityVersion <= ( 5 , 0 ) {
147
+ if let compatibilityVersion = targetInfo . target . swiftRuntimeCompatibilityVersion {
148
+ if compatibilityVersion <= . v5_0 {
154
149
// Swift 5.0 compatibility library
155
150
addArgsForBackDeployLib ( " libswiftCompatibility50.a " )
156
151
}
157
152
158
- if compatibilityVersion <= ( 5 , 1 ) {
153
+ if compatibilityVersion <= . v5_1 {
159
154
// Swift 5.1 compatibility library
160
155
addArgsForBackDeployLib ( " libswiftCompatibility51.a " )
161
156
}
162
157
163
- if linkerOutputType == . executable && compatibilityVersion <= ( 5 , 0 ) {
158
+ if linkerOutputType == . executable && compatibilityVersion <= . v5_0 {
164
159
// Swift 5.0 dynamic replacement compatibility library.
165
160
addArgsForBackDeployLib ( " libswiftCompatibilityDynamicReplacements.a " )
166
161
}
0 commit comments