aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/objc/ReleaseBundlingSupport.java
diff options
context:
space:
mode:
authorGravatar Chris Parsons <cparsons@google.com>2016-06-08 18:02:03 +0000
committerGravatar Yun Peng <pcloudy@google.com>2016-06-09 08:01:22 +0000
commitfac8383b7ca371e7e604327569aa5b35bb9576f4 (patch)
treebea22851e754e9c1e718d24a4f6119d341a58a69 /src/main/java/com/google/devtools/build/lib/rules/objc/ReleaseBundlingSupport.java
parentbbab724f9c3600952a65a90febf50e1118568a96 (diff)
More refactor work on single-/multi- architecture accessor methods of AppleConfiguration.
Additionally, tweak single-architecture ios-platform logic such that ios_multi_cpus is checked before ios_cpu. There are two contexts to note: 1. Single-architecture logic, (generally post-split), unaware of its own platform type aside from configuration. This retrieves platform type from the --apple_platform_type configuration value. a. getSingleArchPlatform() for Platform retrieval b. getSingleArchitecture() for architecture retrieval 2. Multi-architecture logic, which should be aware of its own platform type, and passes it into configuration accessors. a. getMultiArchPlatform(PlatformType) b. getMultiArchitectures(PlatformType) All callers are migrated to these methods, though some still pass IOS platform type even though they may need to be refactored to support additional platform types later. -- MOS_MIGRATED_REVID=124370652
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/objc/ReleaseBundlingSupport.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/objc/ReleaseBundlingSupport.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/ReleaseBundlingSupport.java b/src/main/java/com/google/devtools/build/lib/rules/objc/ReleaseBundlingSupport.java
index 868303e70a..f67b0a8377 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/objc/ReleaseBundlingSupport.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/objc/ReleaseBundlingSupport.java
@@ -261,7 +261,7 @@ public final class ReleaseBundlingSupport {
AppleConfiguration appleConfiguration = ruleContext.getFragment(AppleConfiguration.class);
if (releaseBundling.getProvisioningProfile() == null
- && appleConfiguration.getBundlingPlatform() != Platform.IOS_SIMULATOR) {
+ && appleConfiguration.getMultiArchPlatform(PlatformType.IOS) != Platform.IOS_SIMULATOR) {
ruleContext.attributeError(releaseBundling.getProvisioningProfileAttrName(),
DEVICE_NO_PROVISIONING_PROFILE);
}
@@ -373,7 +373,7 @@ public final class ReleaseBundlingSupport {
String platformWithVersion =
String.format(
"%s%s",
- configuration.getBundlingPlatform().getLowerCaseNameInPlist(),
+ configuration.getMultiArchPlatform(PlatformType.IOS).getLowerCaseNameInPlist(),
configuration.getIosSdkVersion());
ruleContext.registerAction(
ObjcRuleClasses.spawnAppleEnvActionBuilder(ruleContext)
@@ -402,7 +402,7 @@ public final class ReleaseBundlingSupport {
List<Integer> uiDeviceFamily =
TargetDeviceFamily.UI_DEVICE_FAMILY_VALUES.get(bundleSupport.targetDeviceFamilies());
AppleConfiguration appleConfiguration = ruleContext.getFragment(AppleConfiguration.class);
- Platform platform = appleConfiguration.getBundlingPlatform();
+ Platform platform = appleConfiguration.getMultiArchPlatform(PlatformType.IOS);
NSDictionary result = new NSDictionary();
@@ -457,7 +457,7 @@ public final class ReleaseBundlingSupport {
}
AppleConfiguration appleConfiguration = ruleContext.getFragment(AppleConfiguration.class);
- if (appleConfiguration.getBundlingPlatform() == Platform.IOS_DEVICE) {
+ if (appleConfiguration.getMultiArchPlatform(PlatformType.IOS) == Platform.IOS_DEVICE) {
processingNeeded = true;
registerEntitlementsActions();
actionCommandLine += signingCommandLine();
@@ -766,7 +766,7 @@ public final class ReleaseBundlingSupport {
DottedVersion minimumOsVersion) {
ImmutableList<BundleableFile> extraBundleFiles;
AppleConfiguration appleConfiguration = ruleContext.getFragment(AppleConfiguration.class);
- if (appleConfiguration.getBundlingPlatform() == Platform.IOS_DEVICE) {
+ if (appleConfiguration.getMultiArchPlatform(PlatformType.IOS) == Platform.IOS_DEVICE) {
extraBundleFiles = ImmutableList.of(new BundleableFile(
releaseBundling.getProvisioningProfile(), PROVISIONING_PROFILE_BUNDLE_FILE));
} else {
@@ -820,7 +820,7 @@ public final class ReleaseBundlingSupport {
AppleConfiguration appleConfiguration = ruleContext.getFragment(AppleConfiguration.class);
new LipoSupport(ruleContext).registerCombineArchitecturesAction(linkedBinaries(),
- resultingLinkedBinary, appleConfiguration.getPlatform(PlatformType.IOS));
+ resultingLinkedBinary, appleConfiguration.getMultiArchPlatform(PlatformType.IOS));
}
private NestedSet<Artifact> linkedBinaries() {