Skip to content

Commit

Permalink
Revert "Bazel: Fix toolchain vanilla to not hard code java 8"
Browse files Browse the repository at this point in the history
This reverts commit aee1f80.

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

[1] bazelbuild/bazel#9415

Change-Id: I6f81b187e0265ff797589479b7bff98a487c561a
  • Loading branch information
davido committed Nov 11, 2019
1 parent c87019a commit 17b60d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 19 deletions.
12 changes: 6 additions & 6 deletions Documentation/dev-bazel.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand All @@ -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 \
//...
```

Expand All @@ -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
```

Expand Down
13 changes: 0 additions & 13 deletions tools/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down

0 comments on commit 17b60d9

Please sign in to comment.