aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/objc/IosApplicationRule.java
diff options
context:
space:
mode:
authorGravatar Peter Schmitt <schmitt@google.com>2015-03-13 17:01:45 +0000
committerGravatar Han-Wen Nienhuys <hanwen@google.com>2015-03-16 17:34:00 +0000
commit01889715e70b55b9d197e546593878f16cdc0f26 (patch)
treeab7e3350552b5fead62d1abdf473d5882b537271 /src/main/java/com/google/devtools/build/lib/rules/objc/IosApplicationRule.java
parent09cff8f0a83d340729a0e61ca482e56614141487 (diff)
Split ios_application configurations based on --ios_multi_cpus.
Using the new flag works only on ios_application and ios_extension targets, resulting in their output binaries being "universal" with all given architectures included. Internally this is achieved by splitting the "binary" dependency (and its transitive dependencies) of ios_{application,extension} to be built in one of the architectures using split transitions. The results are then combined. Since an ios_application may depend on ios_extension, we transition back to the top-level configuration when encoutering such a dependency using the newly introduced TOP_LEVEL transition and then split configurations again. RELNOTES: --ios_multi_cpus allows building fat ios_applications. -- MOS_MIGRATED_REVID=88555540
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/objc/IosApplicationRule.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/objc/IosApplicationRule.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/IosApplicationRule.java b/src/main/java/com/google/devtools/build/lib/rules/objc/IosApplicationRule.java
index 497955ea92..040a81f77f 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/objc/IosApplicationRule.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/objc/IosApplicationRule.java
@@ -18,6 +18,7 @@ import static com.google.devtools.build.lib.packages.Attribute.ConfigurationTran
import static com.google.devtools.build.lib.packages.Attribute.attr;
import static com.google.devtools.build.lib.packages.Type.BOOLEAN;
import static com.google.devtools.build.lib.packages.Type.LABEL;
+import static com.google.devtools.build.lib.packages.Type.LABEL_LIST;
import com.google.devtools.build.lib.analysis.BaseRuleClasses;
import com.google.devtools.build.lib.analysis.BlazeRule;
@@ -60,6 +61,15 @@ public class IosApplicationRule implements RuleDefinition {
.allowedRuleClasses("objc_binary")
.allowedFileTypes()
.mandatory()
+ .direct_compile_time_input()
+ .cfg(ReleaseBundlingSupport.SPLIT_ARCH_TRANSITION))
+ /* <!-- #BLAZE_RULE(ios_application).ATTRIBUTE(extensions) -->
+ Any extensions to include in the final application.
+ ${SYNOPSIS}
+ <!-- #END_BLAZE_RULE.ATTRIBUTE -->*/
+ .add(attr("extensions", LABEL_LIST)
+ .allowedRuleClasses("ios_extension")
+ .allowedFileTypes()
.direct_compile_time_input())
.add(attr("$runner_script_template", LABEL).cfg(HOST)
.value(env.getLabel("//tools/objc:ios_runner.sh.mac_template")))