Skip to content

Commit

Permalink
Pass more --add-exports= flags
Browse files Browse the repository at this point in the history
Fixes #13138

PiperOrigin-RevId: 366835946
  • Loading branch information
cushon authored and philwo committed Apr 19, 2021
1 parent b0d9fec commit a3a1763
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tools/jdk/default_java_toolchain.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ JDK8_JVM_OPTS = [
JDK9_JVM_OPTS = [
# Allow JavaBuilder to access internal javac APIs.
"--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED",
"--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
"--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED",
"--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED",
"--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED",
"--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED",
"--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED",
"--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED",
"--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
"--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
"--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
"--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED",
"--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED",

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

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

0 comments on commit a3a1763

Please sign in to comment.