Skip to content

Commit

Permalink
Fix Bazel bootstrapping with JDK 7
Browse files Browse the repository at this point in the history
With latest change to the bootstrap compilation, some options
were wrongly moved around.

Tested with `source scripts/ci/build.sh; bazel_build` for JAVA_VERSION
1.7 and 1.8.

--
MOS_MIGRATED_REVID=112409496
  • Loading branch information
damienmg authored and hanwen committed Jan 18, 2016
1 parent 9a9c3b9 commit 5ed7895
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
12 changes: 10 additions & 2 deletions scripts/bootstrap/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,17 @@ fi

: ${JAVA_VERSION:="1.8"}

: ${BAZEL_ARGS:=--singlejar_top=//src/java_tools/singlejar:bootstrap_deploy.jar \
--javabuilder_top=//src/java_tools/buildjar:bootstrap_deploy.jar \
--genclass_top=//src/java_tools/buildjar:bootstrap_genclass_deploy.jar \
--ijar_top=//third_party/ijar \
--strategy=Javac=worker --worker_quit_after_build \
--genrule_strategy=standalone --spawn_strategy=standalone \
"${EXTRA_BAZEL_ARGS:-}"}

if [ -z "${BAZEL-}" ]; then
function bazel_build() {
bootstrap_build ${EXTRA_BAZEL_ARGS-} \
bootstrap_build ${BAZEL_ARGS-} \
--verbose_failures \
--javacopt="-source ${JAVA_VERSION} -target ${JAVA_VERSION}" \
"${EMBED_LABEL_ARG[@]}" \
Expand All @@ -41,7 +49,7 @@ if [ -z "${BAZEL-}" ]; then
else
function bazel_build() {
${BAZEL} --bazelrc=${BAZELRC} build \
${EXTRA_BAZEL_ARGS-} \
${BAZEL_ARGS-} \
--verbose_failures \
--javacopt="-source ${JAVA_VERSION} -target ${JAVA_VERSION}" \
"${EMBED_LABEL_ARG[@]}" \
Expand Down
7 changes: 0 additions & 7 deletions scripts/bootstrap/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,5 @@ function bootstrap_build() {
--rc_source=/dev/null --isatty=1 --terminal_columns=97 \
--ignore_client_env \
--client_cwd=${PWD} \
\
--singlejar_top=//src/java_tools/singlejar:bootstrap_deploy.jar \
--javabuilder_top=//src/java_tools/buildjar:bootstrap_deploy.jar \
--genclass_top=//src/java_tools/buildjar:bootstrap_genclass_deploy.jar \
--ijar_top=//third_party/ijar \
--strategy=Javac=worker --worker_quit_after_build \
--genrule_strategy=standalone --spawn_strategy=standalone \
"${@}"
}

0 comments on commit 5ed7895

Please sign in to comment.