diff --git a/scripts/bootstrap/bootstrap.sh b/scripts/bootstrap/bootstrap.sh index d567b0dbc2262f..d11b6c5086deb1 100755 --- a/scripts/bootstrap/bootstrap.sh +++ b/scripts/bootstrap/bootstrap.sh @@ -32,11 +32,13 @@ fi if [ "${JAVA_VERSION}" = "1.7" ]; then : ${BAZEL_ARGS:=--java_toolchain=//src/java_tools/buildjar:bootstrap_toolchain_jdk7 \ + --host_java_toolchain=//src/java_tools/buildjar:bootstrap_toolchain_jdk7 \ --define JAVA_VERSION=1.7 \ --genrule_strategy=standalone --spawn_strategy=standalone \ "${EXTRA_BAZEL_ARGS:-}"} else : ${BAZEL_ARGS:=--java_toolchain=//src/java_tools/buildjar:bootstrap_toolchain \ + --host_java_toolchain=//src/java_tools/buildjar:bootstrap_toolchain \ --strategy=Javac=worker --worker_quit_after_build \ --genrule_strategy=standalone --spawn_strategy=standalone \ "${EXTRA_BAZEL_ARGS:-}"} diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/JavaOptions.java b/src/main/java/com/google/devtools/build/lib/rules/java/JavaOptions.java index a23f0b4f3c2521..a7fe523b86d24b 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/java/JavaOptions.java +++ b/src/main/java/com/google/devtools/build/lib/rules/java/JavaOptions.java @@ -351,8 +351,7 @@ public FragmentOptions getHost(boolean fallback) { host.jvmOpts = ImmutableList.of("-client", "-XX:ErrorFile=/dev/stderr"); host.javacOpts = javacOpts; - // TODO(cushon): switch to hostJavaToolchain after cl/118829419 makes a blaze release - host.javaToolchain = javaToolchain; + host.javaToolchain = hostJavaToolchain; // Java builds often contain complicated code generators for which // incremental build performance is important.