Rollback of commit b9f401b97590cb95e76efb0ba8bf5319cfe93108.

*** Reason for rollback ***

Broke tests on Mac: https://google.com/url?sa=D&q=http%3A%2F%2Fci.bazel.io%2Fjob%2FBazel%2FJAVA_VERSION%3D1.8%2CPLATFORM_NAME%3Ddarwin-x86_64%2F269%2Fconsole

*** Original change description ***

Speed-up bootstrap on OS X by removing tool compilation.

--
MOS_MIGRATED_REVID=110785493
diff --git a/compile.sh b/compile.sh
index 2b23064..5810348 100755
--- a/compile.sh
+++ b/compile.sh
@@ -32,6 +32,7 @@
   echo "  General purpose commands:" >&2
   echo "     build       = compile,tools,init (default)" >&2
   echo "     compile     = compile a Bazel binary for usage" >&2
+  echo "     tools       = compile and install tooling for Bazel" >&2
   echo "     init        = initialize the base workspace" >&2
   echo "  Commands for developers:" >&2
   echo "     all         = build,determinism,test" >&2
@@ -41,15 +42,17 @@
 }
 
 function parse_options() {
-  local keywords="(build|compile|init|all|determinism|bootstrap|test)"
+  local keywords="(build|compile|tools|init|all|determinism|bootstrap|test)"
   COMMANDS="${1:-build}"
   [[ "${COMMANDS}" =~ ^$keywords(,$keywords)*$ ]] || usage "$@"
   DO_COMPILE=
+  DO_TOOLS_COMPILATION=
   DO_CHECKSUM=
   DO_FULL_CHECKSUM=1
   DO_TESTS=
   DO_BASE_WORKSPACE_INIT=
   [[ "${COMMANDS}" =~ (compile|build|all) ]] && DO_COMPILE=1
+  [[ "${COMMANDS}" =~ (tools|build|all) ]] && DO_TOOLS_COMPILATION=1
   [[ "${COMMANDS}" =~ (init|build|all) ]] && DO_BASE_WORKSPACE_INIT=1
   [[ "${COMMANDS}" =~ (bootstrap|determinism|all) ]] && DO_CHECKSUM=1
   [[ "${COMMANDS}" =~ (bootstrap) ]] && DO_FULL_CHECKSUM=
@@ -85,11 +88,29 @@
   EMBED_LABEL="head (@${git_sha1:-non-git})"
 fi
 
-if [[ $PLATFORM == "darwin" ]] && \
-    xcodebuild -showsdks 2> /dev/null | grep -q '\-sdk iphonesimulator'; then
-  EXTRA_BAZEL_ARGS="${EXTRA_BAZEL_ARGS-} --define IPHONE_SDK=1"
-fi
 source scripts/bootstrap/bootstrap.sh
+if [ $DO_TOOLS_COMPILATION ]; then
+  if [[ $PLATFORM == "darwin" ]]; then
+    bazel_bootstrap //src/tools/xcode/actoolwrapper:actoolwrapper tools/objc/actoolwrapper.sh 0755
+    bazel_bootstrap //src/tools/xcode/ibtoolwrapper:ibtoolwrapper tools/objc/ibtoolwrapper.sh 0755
+    bazel_bootstrap //src/tools/xcode/momcwrapper:momcwrapper tools/objc/momcwrapper.sh 0755
+    bazel_bootstrap //src/tools/xcode/swiftstdlibtoolwrapper:swiftstdlibtoolwrapper tools/objc/swiftstdlibtoolzip.sh 0755
+    bazel_bootstrap //src/tools/xcode/xcrunwrapper:xcrunwrapper tools/objc/xcrunwrapper.sh 0755
+    bazel_bootstrap //src/objc_tools/bundlemerge:bundlemerge_deploy.jar \
+        tools/objc/precomp_bundlemerge_deploy.jar
+    bazel_bootstrap //src/objc_tools/plmerge:plmerge_deploy.jar \
+        tools/objc/precomp_plmerge_deploy.jar
+    bazel_bootstrap //src/objc_tools/xcodegen:xcodegen_deploy.jar \
+        tools/objc/precomp_xcodegen_deploy.jar
+    if xcodebuild -showsdks 2> /dev/null | grep -q '\-sdk iphonesimulator'; then
+        bazel_bootstrap //src/tools/xcode/stdredirect:StdRedirect.dylib \
+            tools/objc/StdRedirect.dylib 0755
+    fi
+    bazel_bootstrap //src/tools/xcode/realpath:realpath tools/objc/realpath 0755
+    bazel_bootstrap //src/tools/xcode/environment:environment_plist \
+        tools/objc/environment_plist.sh 0755
+  fi
+fi
 
 if [ $DO_COMPILE ]; then
   new_step 'Building Bazel with Bazel'