From 26bae084e93901c2b49c958107d8b5b890c38a47 Mon Sep 17 00:00:00 2001 From: Peter Schmitt Date: Tue, 24 Mar 2015 16:05:47 +0000 Subject: Compile objc resources when bundling, not at each target. This change moves the resource compilation actions from each declaring target to the bundle in which they're stored. This bundle is (mostly, see below) the only thing that cares about the compiled resources. As a result, we avoid compiling each resource many times when in a multi-architecture context. Note that as a result of this change rules other than ios_test do no longer add the compiled datamodels and storyboards to files to build. There (should?) be no need for them anyhow. Also, Xcode targets will now no longer contain the transitive closure of datamodels, only their own. Note that in the case where the input resource is produced by a genrule the resource compilation still happens for each architecture but we ignore the results for all but one of the architectures to avoid bundling conflicts. There are also some more validation checks and nicer error messages for users when they specify illegal strings resources. -- MOS_MIGRATED_REVID=89404405 --- .../devtools/build/lib/rules/objc/ObjcProvider.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/main/java/com/google/devtools/build/lib/rules/objc/ObjcProvider.java') diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcProvider.java b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcProvider.java index c121980bed..e559ab4e35 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcProvider.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcProvider.java @@ -125,7 +125,7 @@ public final class ObjcProvider implements TransitiveInfoProvider { public static final Key SDK_DYLIB = new Key<>(STABLE_ORDER); public static final Key SDK_FRAMEWORK = new Key<>(STABLE_ORDER); public static final Key WEAK_SDK_FRAMEWORK = new Key<>(STABLE_ORDER); - public static final Key XCDATAMODEL = new Key<>(STABLE_ORDER); + public static final Key XCDATAMODEL = new Key<>(STABLE_ORDER); public static final Key FLAG = new Key<>(STABLE_ORDER); /** @@ -158,6 +158,21 @@ public final class ObjcProvider implements TransitiveInfoProvider { */ public static final Key DEBUG_SYMBOLS = new Key<>(STABLE_ORDER); + /** + * Artifacts for storyboard sources. + */ + public static final Key STORYBOARD = new Key<>(STABLE_ORDER); + + /** + * Artifacts for .xib file sources. + */ + public static final Key XIB = new Key<>(STABLE_ORDER); + + /** + * Artifacts for strings source files. + */ + public static final Key STRINGS = new Key<>(STABLE_ORDER); + /** * Flags that apply to a transitive build dependency tree. Each item in the enum corresponds to a * flag. If the item is included in the key {@link #FLAG}, then the flag is considered set. -- cgit v1.2.3