aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcConfiguration.java
diff options
context:
space:
mode:
authorGravatar Chris Parsons <cparsons@google.com>2015-10-30 18:32:25 +0000
committerGravatar Florian Weikert <fwe@google.com>2015-11-02 16:54:14 +0000
commit43bc404c4983a902964573ab13b44a6bde7920b3 (patch)
tree8be44c666745021227f6ede427d7b0c61c2c45c8 /src/main/java/com/google/devtools/build/lib/rules/objc/ObjcConfiguration.java
parent28759f18067f474899941156c9312d6aacab8557 (diff)
Strict matching of architecture name to ios platform. Also refactor Platform into a new .apple package, as it is not relevant for solely objc rules.
-- MOS_MIGRATED_REVID=106709486
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/objc/ObjcConfiguration.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/objc/ObjcConfiguration.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcConfiguration.java b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcConfiguration.java
index abeccdc0fe..c5fe6c614a 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcConfiguration.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcConfiguration.java
@@ -24,6 +24,7 @@ import com.google.devtools.build.lib.analysis.BlazeDirectories;
import com.google.devtools.build.lib.analysis.config.BuildConfiguration;
import com.google.devtools.build.lib.analysis.config.CompilationMode;
import com.google.devtools.build.lib.cmdline.Label;
+import com.google.devtools.build.lib.rules.apple.Platform;
import com.google.devtools.build.lib.rules.objc.ReleaseBundlingSupport.SplitArchTransition.ConfigurationDistinguisher;
import com.google.devtools.build.lib.vfs.Path;
@@ -168,9 +169,9 @@ public class ObjcConfiguration extends BuildConfiguration.Fragment {
/**
* Returns the platform of the configuration for the current bundle, based on configured
- * architectures (for example, {@code i386} maps to {@link Platform#SIMULATOR}).
+ * architectures (for example, {@code i386} maps to {@link Platform#IOS_SIMULATOR}).
*
- * <p>If {@link #getIosMultiCpus()} is set, returns {@link Platform#DEVICE} if any of the
+ * <p>If {@link #getIosMultiCpus()} is set, returns {@link Platform#IOS_DEVICE} if any of the
* architectures matches it, otherwise returns the mapping for {@link #getIosCpu()}.
*
* <p>Note that this method should not be used to determine the platform for code compilation.
@@ -180,8 +181,8 @@ public class ObjcConfiguration extends BuildConfiguration.Fragment {
// (in particular actool, bundlemerge, momc) have been upgraded to support multiple values.
public Platform getBundlingPlatform() {
for (String architecture : getIosMultiCpus()) {
- if (Platform.forArch(architecture) == Platform.DEVICE) {
- return Platform.DEVICE;
+ if (Platform.forArch(architecture) == Platform.IOS_DEVICE) {
+ return Platform.IOS_DEVICE;
}
}
return Platform.forArch(getIosCpu());