Rollback of commit 47107aad33695a040b0f771f0c09d66874c4d533.

*** Reason for rollback ***

Breaks a few thousand targets in the depot. It's weird, but I confirmed
manually that this rollback fixes the issue.

*** Original change description ***

Distinguish between user-supplied ios_cpu and the default, and don't propagate the default to the XCode project control.

--
MOS_MIGRATED_REVID=102340901
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcCommandLineOptions.java b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcCommandLineOptions.java
index 8873bac..c4f70e3 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcCommandLineOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcCommandLineOptions.java
@@ -15,8 +15,6 @@
 package com.google.devtools.build.lib.rules.objc;
 
 import com.google.common.annotations.VisibleForTesting;
-import com.google.common.base.Optional;
-import com.google.common.base.Strings;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Multimap;
 import com.google.devtools.build.lib.analysis.config.BuildConfiguration.LabelConverter;
@@ -69,11 +67,10 @@
           + "on the machine the simulator will be run on.")
   public String iosSimulatorDevice;
 
-  // TODO(bazel-team): Consider using optional for values like these.
   @Option(name = "ios_cpu",
-      defaultValue = "",
+      defaultValue = DEFAULT_IOS_CPU,
       category = "build",
-      help = "The target CPU for iOS compilation.")
+      help = "Specifies to target CPU of iOS compilation.")
   public String iosCpu;
 
   @Option(name = "xcode_options",
@@ -190,33 +187,13 @@
     }
   }
 
-  /**
-   * Returns the value of the ios_cpu flag, or a default value if none was specified.
-   */
-  public String getIosCpu() {
-    if ("".equals(iosCpu)) {
-      return DEFAULT_IOS_CPU;
-    } else {
-      return iosCpu;
-    }
-  }
-
-  /**
-   * Returns the value of the ios_cpu flag, if it was specified.
-   * This is to distinguish between the default cpu used by the build tools and the cpu explicitly
-   * requested by user configuration.
-   */
-  public Optional<String> getConfiguredIosCpu() {
-    return Strings.isNullOrEmpty(iosCpu) ? Optional.<String>absent() : Optional.of(iosCpu);
-  }
-
   private Platform getPlatform() {
     for (String architecture : iosMultiCpus) {
       if (Platform.forArch(architecture) == Platform.DEVICE) {
         return Platform.DEVICE;
       }
     }
-    return Platform.forArch(getIosCpu());
+    return Platform.forArch(iosCpu);
   }
 
   @Override
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 826f22d..299bc29 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
@@ -58,7 +58,6 @@
   private final String iosSimulatorVersion;
   private final String iosSimulatorDevice;
   private final String iosCpu;
-  private final Optional<String> configuredIosCpu;
   private final String xcodeOptions;
   private final Optional<String> xcodeVersionOverride;
   private final boolean generateDebugSymbols;
@@ -94,9 +93,7 @@
         Preconditions.checkNotNull(objcOptions.iosSimulatorDevice, "iosSimulatorDevice");
     this.iosSimulatorVersion =
         Preconditions.checkNotNull(objcOptions.iosSimulatorVersion, "iosSimulatorVersion");
-    this.iosCpu = Preconditions.checkNotNull(objcOptions.getIosCpu(), "iosCpu");
-    this.configuredIosCpu =
-        Preconditions.checkNotNull(objcOptions.getConfiguredIosCpu(), "configuredIosCpu");
+    this.iosCpu = Preconditions.checkNotNull(objcOptions.iosCpu, "iosCpu");
     this.xcodeOptions = Preconditions.checkNotNull(objcOptions.xcodeOptions, "xcodeOptions");
     this.generateDebugSymbols = objcOptions.generateDebugSymbols;
     this.runMemleaks = objcOptions.runMemleaks;
@@ -150,22 +147,11 @@
     return iosSimulatorVersion;
   }
 
-  /**
-   * Returns the ios_cpu value to use.
-   */
   public String getIosCpu() {
     return iosCpu;
   }
 
   /**
-   * Returns the ios_cpu value set by the configuration (that is, by a command-line flag
-   * or by an ios_multi_cpu split configuration), if it is present.
-   */
-  public Optional<String> getConfiguredIosCpu() {
-    return configuredIosCpu;
-  }
-
-  /**
    * Returns the platform of the configuration for the current bundle, based on configured
    * architectures (for example, {@code i386} maps to {@link Platform#SIMULATOR}).
    *
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/XcodeSupport.java b/src/main/java/com/google/devtools/build/lib/rules/objc/XcodeSupport.java
index d0015fc..45f9726 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/objc/XcodeSupport.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/objc/XcodeSupport.java
@@ -234,11 +234,7 @@
 
         List<String> multiCpus = objcConfiguration.getIosMultiCpus();
         if (multiCpus.isEmpty()) {
-          // Only add a CPU architecture if one was explicitly configured.
-          // Otherwise, the XCode generation tools will supply a default for XCode.
-          if (objcConfiguration.getConfiguredIosCpu().isPresent()) {
-            builder.addCpuArchitecture(objcConfiguration.getConfiguredIosCpu().get());
-          }
+          builder.addCpuArchitecture(objcConfiguration.getIosCpu());
         } else {
           builder.addAllCpuArchitecture(multiCpus);
         }