diff options
author | 2016-05-27 19:35:59 +0000 | |
---|---|---|
committer | 2016-05-30 09:20:33 +0000 | |
commit | adccc11325f0b11307e1c0eace89b85032a95bdc (patch) | |
tree | c270128f06eaad5f9eb95e3e9547b2df8fd216b2 /src/main/java/com/google/devtools/build/lib/rules/objc/BundleSupport.java | |
parent | 0f4927f30a1ab99ebdc9d41df708800d73a76adf (diff) |
Refactoring of Apple Platform detection and usage, to pave the way for non-IOS Platforms.
There are still various places which infer IOS platform type which need to be fixed, but this ensures switching to other platform types is as easy as changing an argument.
--
MOS_MIGRATED_REVID=123444548
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/objc/BundleSupport.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/objc/BundleSupport.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/BundleSupport.java b/src/main/java/com/google/devtools/build/lib/rules/objc/BundleSupport.java index abbeba537c..bb816ba2be 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/BundleSupport.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/BundleSupport.java @@ -36,6 +36,7 @@ import com.google.devtools.build.lib.collect.nestedset.NestedSet; import com.google.devtools.build.lib.rules.apple.AppleConfiguration; import com.google.devtools.build.lib.rules.apple.AppleToolchain; import com.google.devtools.build.lib.rules.apple.Platform; +import com.google.devtools.build.lib.rules.apple.Platform.PlatformType; import com.google.devtools.build.lib.rules.objc.XcodeProvider.Builder; import com.google.devtools.build.lib.vfs.FileSystemUtils; import com.google.devtools.build.lib.vfs.PathFragment; @@ -137,8 +138,8 @@ final class BundleSupport { Platform platform = null; for (String architecture : appleConfiguration.getIosMultiCpus()) { if (platform == null) { - platform = Platform.forIosArch(architecture); - } else if (platform != Platform.forIosArch(architecture)) { + platform = Platform.forTarget(PlatformType.IOS, architecture); + } else if (platform != Platform.forTarget(PlatformType.IOS, architecture)) { ruleContext.ruleError( String.format("In builds which require bundling, --ios_multi_cpus does not currently " + "allow values for both simulator and device builds. Flag was %s", |