Revert "Bazel: Fix toolchain vanilla to not hard code java 8"

This reverts commit aee1f800ad.

Reason for revert: The upstream issue: [1] was fixed in 1.0
Bazel release and gerrit switched to using Bazel 1.1 recently.

[1] https://github.com/bazelbuild/bazel/issues/9415

Change-Id: I6f81b187e0265ff797589479b7bff98a487c561a
This commit is contained in:
David Ostrovsky
2019-11-10 12:25:53 -08:00
parent c87019a0ef
commit 17b60d9927
2 changed files with 6 additions and 19 deletions

View File

@@ -44,8 +44,8 @@ provide the path to JDK home:
--define=ABSOLUTE_JAVABASE=<path-to-java-12> \
--javabase=@bazel_tools//tools/jdk:absolute_javabase \
--host_javabase=@bazel_tools//tools/jdk:absolute_javabase \
--host_java_toolchain=//tools:toolchain_vanilla \
--java_toolchain=//tools:toolchain_vanilla \
--host_java_toolchain=@bazel_tools//tools/jdk:toolchain_vanilla \
--java_toolchain=@bazel_tools//tools/jdk:toolchain_vanilla \
:release
```
@@ -57,8 +57,8 @@ bazel test runs the test using the target javabase:
--define=ABSOLUTE_JAVABASE=<path-to-java-12> \
--javabase=@bazel_tools//tools/jdk:absolute_javabase \
--host_javabase=@bazel_tools//tools/jdk:absolute_javabase \
--host_java_toolchain=//tools:toolchain_vanilla \
--java_toolchain=//tools:toolchain_vanilla \
--host_java_toolchain=@bazel_tools//tools/jdk:toolchain_vanilla \
--java_toolchain=@bazel_tools//tools/jdk:toolchain_vanilla \
//...
```
@@ -70,8 +70,8 @@ $ cat << EOF > ~/.bazelrc
> build --define=ABSOLUTE_JAVABASE=<path-to-java-12>
> build --javabase=@bazel_tools//tools/jdk:absolute_javabase
> build --host_javabase=@bazel_tools//tools/jdk:absolute_javabase
> build --host_java_toolchain=//tools:toolchain_vanilla
> build --java_toolchain=//tools:toolchain_vanilla
> build --host_java_toolchain=@bazel_tools//tools/jdk:toolchain_vanilla
> build --java_toolchain=@bazel_tools//tools/jdk:toolchain_vanilla
> EOF
```

View File

@@ -15,19 +15,6 @@ py_binary(
visibility = ["//visibility:public"],
)
# TODO(davido): Remove this workaround and switch to using toolchain_vanilla
# from this Bazel package again: @bazel_tools//tools/jdk:toolchain_vanilla,
# when this issue is fixed: https://github.com/bazelbuild/bazel/issues/9415.
default_java_toolchain(
name = "toolchain_vanilla",
forcibly_disable_header_compilation = True,
javabuilder = ["@bazel_tools//tools/jdk:vanillajavabuilder"],
jvm_opts = [],
source_version = "",
target_version = "",
visibility = ["//visibility:public"],
)
default_java_toolchain(
name = "error_prone_warnings_toolchain",
bootclasspath = ["@bazel_tools//tools/jdk:platformclasspath.jar"],