@@ -144,12 +144,16 @@ https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bu
144
144
throw PreconditionError ( message: " Settings not found for target/command combination: \( guid) / \( buildRequest. command) " )
145
145
}
146
146
147
+ var ids = settings. base
147
148
for platform in allPlatformsToSearch ( buildRequest. platform) {
148
149
guard let platform = settings. platforms [ platform] else { continue }
149
- for prefix in prefixes {
150
- for id in platform ?? settings. base {
151
- lines. append ( " \( target. label) \n \( prefix) \( id) " )
152
- }
150
+ // An explicit nil value in platforms indicates inheritence from base
151
+ ids = platform ?? settings. base
152
+ break
153
+ }
154
+ for prefix in prefixes {
155
+ for id in ids {
156
+ lines. append ( " \( target. label) \n \( prefix) \( id) " )
153
157
}
154
158
}
155
159
}
@@ -228,18 +232,18 @@ extension PIF.Target.BuildConfiguration {
228
232
let platform = String ( key. dropFirst ( 20 ) . dropLast ( 2 ) )
229
233
if value == " $(BAZEL_TARGET_ID) " {
230
234
// This value indicates that the provided platform inherits from the base build setting. Store nil for later processing.
231
- build? . platforms [ platform] = nil
235
+ build? . platforms [ platform] = Optional < [ String ] > . none
232
236
} else {
233
- build? . platforms [ platform] = [ value]
237
+ build? . platforms [ platform] = . some ( [ value] )
234
238
}
235
239
}
236
240
if buildFiles != nil , key. starts ( with: " BAZEL_COMPILE_TARGET_IDS[sdk= " ) {
237
241
let platform = String ( key. dropFirst ( 29 ) . dropLast ( 2 ) )
238
242
if value == " $(BAZEL_COMPILE_TARGET_IDS) " {
239
243
// This value indicates that the provided platform inherits from the base build setting. Store nil for later processing.
240
- buildFiles? . platforms [ platform] = nil
244
+ buildFiles? . platforms [ platform] = Optional < [ String ] > . none
241
245
} else {
242
- buildFiles? . platforms [ platform] = compileTargetIds ( value)
246
+ buildFiles? . platforms [ platform] = . some ( compileTargetIds ( value) )
243
247
}
244
248
}
245
249
}
0 commit comments