diff options
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/objc/XcodeSupport.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/objc/XcodeSupport.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/XcodeSupport.java b/src/main/java/com/google/devtools/build/lib/rules/objc/XcodeSupport.java index db59f0112a..e2d057d990 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/XcodeSupport.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/XcodeSupport.java @@ -129,4 +129,23 @@ public final class XcodeSupport { ObjcRuleClasses.objcConfiguration(ruleContext)); return this; } + + /** + * Generates an extra {@link XcodeProductType#LIBRARY_STATIC} Xcode target with the same + * compilation artifacts as the main Xcode target associated with this Xcode support. The extra + * Xcode library target, instead of the main Xcode target, will act as a dependency for all + * dependent Xcode targets. + * + * <p>This is needed to build the Xcode binary target generated by ios_application in XCode. + * Currently there is an Xcode target dependency between the binary target from ios_application + * and the binary target from objc_binary. But Xcode does not link in compiled artifacts from + * binary dependencies, so any sources specified on objc_binary rules will not be compiled and + * linked into the app bundle in dependent binary targets associated with ios_application in + * XCode. + */ + // TODO(bazel-team): Remove this when the binary rule types and bundling rule types are merged. + XcodeSupport generateCompanionLibXcodeTarget(Builder xcodeProviderBuilder) { + xcodeProviderBuilder.generateCompanionLibTarget(); + return this; + } } |