Skip to content

Commit 54e89da

Browse files
committed
Reference platformclasspath in @bazel_tools
The `platformclasspath` rule in `@rules_java` always requires a bootstrap Java runtime toolchain to be registered, but whether the commonly used toolchain macros in `@bazel_tools` register this toolchain depends on the version of Bazel that is running the build and the version of `rules_java` it bundles as `@rules_java_builtin`. In order to support all Bazel versions, reference the `platformclasspath` in `@bazel_tools`, which in turn references the corresponding target in `@rules_java_builtin`, which may or may not be the current version of this code.
1 parent 1213a73 commit 54e89da

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

toolchains/default_java_toolchain.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ _BASE_TOOLCHAIN_CONFIGURATION = dict(
8686
singlejar = [Label("//toolchains:singlejar")],
8787
# Code to enumerate target JVM boot classpath uses host JVM. Because
8888
# java_runtime-s are involved, its implementation is in @bazel_tools.
89-
bootclasspath = [Label("//toolchains:platformclasspath")],
89+
bootclasspath = [Label("@bazel_tools//tools/jdk:platformclasspath")],
9090
source_version = "8",
9191
target_version = "8",
9292
reduced_classpath_incompatible_processors = [

0 commit comments

Comments
 (0)