aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Lukacs Berki <lberki@google.com>2015-10-12 13:24:44 +0000
committerGravatar Lukacs Berki <lberki@google.com>2015-10-12 13:30:41 +0000
commit0d5d522bf9fc2ae42ab71ca60094c79eb988501c (patch)
tree41ea2e0937f4693870737f61ef8fefde8fdc9d5e
parentfc911c6af0a51cc1ab4b14be39f281ac1c86fb4a (diff)
Make the bootstrapping process work again after moving tools to the @bazel_tools repository.
The fix is to always compile tools when the Bazel binary is compiled and add the bootstrap arguments to bootstrap_test. This stil litters the git client with output files in random places, which is a bit difficult to fix, since //src:bazel expects these files to be there so that it can embed them into the output binary. I didn't notice this issue because tools/jdk/*_deploy.jar is in the .gitignore file, thus, when "git status" reported nothing, I asumed I ran the build in a clean client. -- MOS_MIGRATED_REVID=105206124
-rwxr-xr-xcompile.sh17
-rwxr-xr-xscripts/bootstrap/bootstrap.sh1
2 files changed, 8 insertions, 10 deletions
diff --git a/compile.sh b/compile.sh
index dbf75bbe00..56ca3da74a 100755
--- a/compile.sh
+++ b/compile.sh
@@ -89,16 +89,6 @@ if [ "${EMBED_LABEL-x}" = "x" ]; then
fi
source scripts/bootstrap/bootstrap.sh
-if [ $DO_COMPILE ]; then
- new_step 'Building Bazel with Bazel'
- display "."
- bazel_bootstrap //src:bazel output/bazel 0755 1
- BAZEL=$(pwd)/output/bazel
-fi
-
-#
-# Bootstrap tools using the release binary
-#
if [ $DO_TOOLS_COMPILATION ]; then
new_step 'Building Bazel tools'
bazel_bootstrap //third_party/ijar:ijar tools/jdk/ijar 0755
@@ -129,6 +119,13 @@ if [ $DO_TOOLS_COMPILATION ]; then
fi
fi
+if [ $DO_COMPILE ]; then
+ new_step 'Building Bazel with Bazel'
+ display "."
+ bazel_bootstrap //src:bazel output/bazel 0755 1
+ BAZEL=$(pwd)/output/bazel
+fi
+
#
# Output is deterministic between two bootstrapped bazel binary using the actual tools and the
# released binary.
diff --git a/scripts/bootstrap/bootstrap.sh b/scripts/bootstrap/bootstrap.sh
index 5e073de360..b153bad636 100755
--- a/scripts/bootstrap/bootstrap.sh
+++ b/scripts/bootstrap/bootstrap.sh
@@ -80,6 +80,7 @@ function bootstrap_test() {
run_silent ${BAZEL_BIN} --nomaster_bazelrc --bazelrc=${BAZELRC} clean \
--expunge || return $?
run_silent ${BAZEL_BIN} --nomaster_bazelrc --bazelrc=${BAZELRC} build \
+ ${BAZEL_ARGS} \
--fetch --nostamp \
--javacopt="-source ${JAVA_VERSION} -target ${JAVA_VERSION}" \
//src:bazel || return $?