Skip to content

Commit a3a1763

Browse files
cushonphilwo
authored andcommitted
Pass more --add-exports= flags
Fixes #13138 PiperOrigin-RevId: 366835946
1 parent b0d9fec commit a3a1763

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tools/jdk/default_java_toolchain.bzl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@ JDK8_JVM_OPTS = [
2323
JDK9_JVM_OPTS = [
2424
# Allow JavaBuilder to access internal javac APIs.
2525
"--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED",
26-
"--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
27-
"--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED",
28-
"--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED",
2926
"--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED",
27+
"--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED",
28+
"--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED",
29+
"--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED",
3030
"--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
3131
"--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
32+
"--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
33+
"--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED",
3234
"--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED",
3335

3436
# override the javac in the JDK.
@@ -139,7 +141,9 @@ def _bootclasspath_impl(ctx):
139141

140142
args = ctx.actions.args()
141143
args.add("-XX:+IgnoreUnrecognizedVMOptions")
144+
args.add("--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED")
142145
args.add("--add-exports=jdk.compiler/com.sun.tools.javac.platform=ALL-UNNAMED")
146+
args.add("--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED")
143147
args.add_joined(
144148
"-cp",
145149
[class_outputs[0].dirname, "%s/lib/tools.jar" % host_javabase.java_home],

0 commit comments

Comments
 (0)