Skip to content

Commit

Permalink
Automated rollback of commit 7e48642.
Browse files Browse the repository at this point in the history
*** Reason for rollback ***

Breaks presubmit https://buildkite.com/bazel/google-bazel-presubmit/builds/42622#10f51cb9-f2c5-4b09-bd04-01196a37aba9

*** Original change description ***

Attach local JDK to JVM8_TOOLCHAIN_CONFIGURATION.

This is a partial revert of ec29e28.
The commit support rules_appengine usecase, which needs to supply additional parameters to a toolchain compiling with JDK8.
Previously the whole commit broke repos that are using bazel-toolchains.

Caveat: the downstream still breaks rules_appengine on Java 11 only system (Ubuntu 18.04). I believe this is correct behavio...

***

PiperOrigin-RevId: 350780263
  • Loading branch information
comius authored and copybara-github committed Jan 8, 2021
1 parent d07bf13 commit fd44d30
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/test/shell/bazel/bazel_java_test_defaults.sh
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ load("@bazel_tools//tools/jdk:default_java_toolchain.bzl", "default_java_toolcha
default_java_toolchain(
name = "jvm8_toolchain",
configuration = JVM8_TOOLCHAIN_CONFIGURATION,
java_runtime = "@local_jdk//:jdk",
)
EOF

Expand Down
7 changes: 0 additions & 7 deletions tools/jdk/BUILD.tools
Original file line number Diff line number Diff line change
Expand Up @@ -467,10 +467,3 @@ java_runtime_version_alias(
),
visibility = ["//visibility:public"],
)

java_runtime_version_alias(
name = "jdk_8",
runtime_version = "8",
selected_java_runtime = ":legacy_current_java_runtime",
visibility = ["//visibility:public"],
)
3 changes: 1 addition & 2 deletions tools/jdk/default_java_toolchain.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"""Bazel rules for creating Java toolchains."""

JDK8_JVM_OPTS = [
"-Xbootclasspath/p:$(location @remote_java_tools//:javac_jar)",
"-Xbootclasspath/p:$(location @bazel_tools//tools/jdk:javac_jar)",
]

# JVM options, without patching java.compiler and jdk.compiler modules.
Expand Down Expand Up @@ -74,7 +74,6 @@ _BASE_TOOLCHAIN_CONFIGURATION = dict(
JVM8_TOOLCHAIN_CONFIGURATION = dict(
tools = ["@remote_java_tools//:javac_jar"],
jvm_opts = ["-Xbootclasspath/p:$(location @remote_java_tools//:javac_jar)"],
java_runtime = "@bazel_tools//tools/jdk:jdk_8",
)

DEFAULT_TOOLCHAIN_CONFIGURATION = dict(
Expand Down

0 comments on commit fd44d30

Please sign in to comment.