Replace "javac" attribute with "tools" attribute in java_toolchain.
This is preparation for removal of "javac" attribute.
The main usecase for "javac" attribute is to use it in $location function during JVM parameters expansion. And this works when javac is added to tools attribute.
There is a starlark API to retrieve javac from the java toolchain, but without a known usecase. That API is not used internally and it is not tested.
PiperOrigin-RevId: 342894757
diff --git a/tools/jdk/java_toolchain_default.bzl.java_tools b/tools/jdk/java_toolchain_default.bzl.java_tools
index c6e6e1c..356c9fe 100644
--- a/tools/jdk/java_toolchain_default.bzl.java_tools
+++ b/tools/jdk/java_toolchain_default.bzl.java_tools
@@ -62,7 +62,7 @@
)
JVM8_TOOLCHAIN_CONFIGURATION = dict(
- javac = ["//:javac_jar"],
+ tools = ["//:javac_jar"],
jvm_opts = ["-Xbootclasspath/p:$(location //:javac_jar)"],
)
@@ -127,7 +127,6 @@
_LABEL_LISTS = [
"bootclasspath",
- "extclasspath",
"javac",
"tools",
"javabuilder",