aboutsummaryrefslogtreecommitdiffhomepage
path: root/compile.sh
diff options
context:
space:
mode:
authorGravatar Dmitry Lomov <dslomov@google.com>2015-12-22 19:24:00 +0000
committerGravatar Dmitry Lomov <dslomov@google.com>2015-12-22 19:57:50 +0000
commitac6ed79e1a3fa6b0ca91657b28e2a35f7e49758c (patch)
tree8d08937bd560b75d23016426e2ded36899d90820 /compile.sh
parent5fd83b28a267bbd4edbd01370e4b7905f5f9b0de (diff)
*** 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
Diffstat (limited to 'compile.sh')
-rwxr-xr-xcompile.sh31
1 files changed, 26 insertions, 5 deletions
diff --git a/compile.sh b/compile.sh
index 2b23064916..58103488d4 100755
--- a/compile.sh
+++ b/compile.sh
@@ -32,6 +32,7 @@ function usage() {
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 usage() {
}
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 @@ if [ "${EMBED_LABEL-x}" = "x" ]; then
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'