Temporarily restore the JDK 8 host_javabase-compatible toolchain
Unlike previously, this is not magically selected when running on JDK 8.
Use --java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8
host_java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8 to configure
the JDK 8 host_javabase-compatible toolchain.
@@ -192,6 +192,16 @@ genrule(
tools = ["@bazel_tools//tools/jdk:ijar"],
)
+default_java_toolchain(
+ name = "toolchain_hostjdk8",
+ bootclasspath = [":platformclasspath"],
+ jvm_opts = [
+ "-Xbootclasspath/p:$(location @bazel_tools//third_party/java/jdk/langtools:javac_jar)",
+ ],
+ source_version = "8",
+ target_version = "8",
+)
+
default_java_toolchain(
name = "toolchain",
bootclasspath = [":bootclasspath"],
