diff --git a/WORKSPACE b/WORKSPACE index 33ca3222862a23..c2452717c8664d 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -624,6 +624,58 @@ http_archive( ], ) +# This must be kept in sync with src/main/java/com/google/devtools/build/lib/bazel/rules/java/jdk.WORKSPACE. +http_archive( + name = "remotejdk16_linux_for_testing", + build_file = "@local_jdk//:BUILD.bazel", + patch_cmds = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE, + patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE_WIN, + sha256 = "236b5ea97aff3cb312e743848d7efa77faf305170e41371a732ca93c1b797665", + strip_prefix = "zulu16.28.11-ca-jdk16.0.0-linux_x64", + urls = [ + "https://cdn.azul.com/zulu/bin/zulu16.28.11-ca-jdk16.0.0-linux_x64.tar.gz", + ], +) + +# This must be kept in sync with src/main/java/com/google/devtools/build/lib/bazel/rules/java/jdk.WORKSPACE. +http_archive( + name = "remotejdk16_macos_for_testing", + build_file = "@local_jdk//:BUILD.bazel", + patch_cmds = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE, + patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE_WIN, + sha256 = "6d47ef22dc56ce1f5a102ed39e21d9a97320f0bb786818e2c686393109d79bc5", + strip_prefix = "zulu16.28.11-ca-jdk16.0.0-macosx_x64", + urls = [ + "https://cdn.azul.com/zulu/bin/zulu16.28.11-ca-jdk16.0.0-macosx_x64.tar.gz", + ], +) + +# This must be kept in sync with src/main/java/com/google/devtools/build/lib/bazel/rules/java/jdk.WORKSPACE. +http_archive( + name = "remotejdk16_macos_aarch64_for_testing", + build_file = "@local_jdk//:BUILD.bazel", + patch_cmds = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE, + patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE_WIN, + sha256 = "c92131e83bc71474850e667bc4e05fca33662b8feb009a0547aa14e76b40e890", + strip_prefix = "zulu16.28.11-ca-jdk16.0.0-macosx_aarch64", + urls = [ + "https://cdn.azul.com/zulu/bin/zulu16.28.11-ca-jdk16.0.0-macosx_aarch64.tar.gz", + ], +) + +# This must be kept in sync with src/main/java/com/google/devtools/build/lib/bazel/rules/java/jdk.WORKSPACE. +http_archive( + name = "remotejdk16_win_for_testing", + build_file = "@local_jdk//:BUILD.bazel", + patch_cmds = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE, + patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE_WIN, + sha256 = "6cbf98ada27476526a5f6dff79fd5f2c15e2f671818e503bdf741eb6c8fed3d4", + strip_prefix = "zulu16.28.11-ca-jdk16.0.0-win_x64", + urls = [ + "https://cdn.azul.com/zulu/bin/zulu16.28.11-ca-jdk16.0.0-win_x64.zip", + ], +) + # Used in src/main/java/com/google/devtools/build/lib/bazel/rules/java/jdk.WORKSPACE. dist_http_archive( name = "remote_java_tools_for_testing", @@ -791,6 +843,62 @@ exports_files(["WORKSPACE"], visibility = ["//visibility:public"]) ], ) +# This must be kept in sync with src/test/shell/bazel/testdata/jdk_http_archives. +http_archive( + name = "openjdk16_linux_archive", + build_file_content = """ +java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public']) +exports_files(["WORKSPACE"], visibility = ["//visibility:public"]) +""", + sha256 = "236b5ea97aff3cb312e743848d7efa77faf305170e41371a732ca93c1b797665", + strip_prefix = "zulu16.28.11-ca-jdk16.0.0-linux_x64", + urls = [ + "https://cdn.azul.com/zulu/bin/zulu16.28.11-ca-jdk16.0.0-linux_x64.tar.gz" + ], +) + +# This must be kept in sync with src/test/shell/bazel/testdata/jdk_http_archives. +http_archive( + name = "openjdk16_darwin_archive", + build_file_content = """ +java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public']) +exports_files(["WORKSPACE"], visibility = ["//visibility:public"]) +""", + sha256 = "6d47ef22dc56ce1f5a102ed39e21d9a97320f0bb786818e2c686393109d79bc5", + strip_prefix = "zulu16.28.11-ca-jdk16.0.0-macosx_x64", + urls = [ + "https://cdn.azul.com/zulu/bin/zulu16.28.11-ca-jdk16.0.0-macosx_x64.tar.gz", + ], +) + +# This must be kept in sync with src/test/shell/bazel/testdata/jdk_http_archives. +http_archive( + name = "openjdk16_darwin_aarch64_archive", + build_file_content = """ +java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public']) +exports_files(["WORKSPACE"], visibility = ["//visibility:public"]) +""", + sha256 = "c92131e83bc71474850e667bc4e05fca33662b8feb009a0547aa14e76b40e890", + strip_prefix = "zulu16.28.11-ca-jdk16.0.0-macosx_aarch64", + urls = [ + "https://cdn.azul.com/zulu/bin/zulu16.28.11-ca-jdk16.0.0-macosx_aarch64.tar.gz", + ], +) + +# This must be kept in sync with src/test/shell/bazel/testdata/jdk_http_archives. +http_archive( + name = "openjdk16_windows_archive", + build_file_content = """ +java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public']) +exports_files(["WORKSPACE"], visibility = ["//visibility:public"]) +""", + sha256 = "6cbf98ada27476526a5f6dff79fd5f2c15e2f671818e503bdf741eb6c8fed3d4", + strip_prefix = "zulu16.28.11-ca-jdk16.0.0-win_x64", + urls = [ + "https://cdn.azul.com/zulu/bin/zulu16.28.11-ca-jdk16.0.0-win_x64.zip", + ], +) + load("@io_bazel_skydoc//:setup.bzl", "stardoc_repositories") stardoc_repositories() diff --git a/src/BUILD b/src/BUILD index 0ac483eba02917..9df2e8cc181e90 100644 --- a/src/BUILD +++ b/src/BUILD @@ -715,6 +715,10 @@ filegroup( "@openjdk15_darwin_archive//:WORKSPACE", "@openjdk15_linux_archive//:WORKSPACE", "@openjdk15_windows_archive//:WORKSPACE", + "@openjdk16_darwin_aarch64_archive//:WORKSPACE", + "@openjdk16_darwin_archive//:WORKSPACE", + "@openjdk16_linux_archive//:WORKSPACE", + "@openjdk16_windows_archive//:WORKSPACE", "@openjdk_linux_aarch64_minimal//file", "@openjdk_linux_minimal//file", "@openjdk_macos_aarch64_minimal//file", @@ -740,6 +744,10 @@ filegroup( "@remotejdk15_macos_aarch64_for_testing//:WORKSPACE", "@remotejdk15_macos_for_testing//:WORKSPACE", "@remotejdk15_win_for_testing//:WORKSPACE", + "@remotejdk16_linux_for_testing//:WORKSPACE", + "@remotejdk16_macos_aarch64_for_testing//:WORKSPACE", + "@remotejdk16_macos_for_testing//:WORKSPACE", + "@remotejdk16_win_for_testing//:WORKSPACE", "@rules_cc//:WORKSPACE", "@rules_java//:WORKSPACE", "@rules_pkg//:WORKSPACE", diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/java/jdk.WORKSPACE.tmpl b/src/main/java/com/google/devtools/build/lib/bazel/rules/java/jdk.WORKSPACE.tmpl index 11ad1be3eeb035..ef05c58ffb308a 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/rules/java/jdk.WORKSPACE.tmpl +++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/java/jdk.WORKSPACE.tmpl @@ -200,6 +200,70 @@ maybe( version = "15", ) +# This must be kept in sync with the top-level WORKSPACE file. +maybe( + remote_java_repository, + name = "remotejdk16_linux", + exec_compatible_with = [ + "@platforms//os:linux", + "@platforms//cpu:x86_64", + ], + sha256 = "236b5ea97aff3cb312e743848d7efa77faf305170e41371a732ca93c1b797665", + strip_prefix = "zulu16.28.11-ca-jdk16.0.0-linux_x64", + urls = [ + "https://cdn.azul.com/zulu/bin/zulu16.28.11-ca-jdk16.0.0-linux_x64.tar.gz", + ], + version = "16", +) + +# This must be kept in sync with the top-level WORKSPACE file. +maybe( + remote_java_repository, + name = "remotejdk16_macos", + exec_compatible_with = [ + "@platforms//os:macos", + "@platforms//cpu:x86_64", + ], + sha256 = "6d47ef22dc56ce1f5a102ed39e21d9a97320f0bb786818e2c686393109d79bc5", + strip_prefix = "zulu16.28.11-ca-jdk16.0.0-macosx_x64", + urls = [ + "https://cdn.azul.com/zulu/bin/zulu16.28.11-ca-jdk16.0.0-macosx_x64.tar.gz", + ], + version = "16", +) + +# This must be kept in sync with the top-level WORKSPACE file. +maybe( + remote_java_repository, + name = "remotejdk16_macos_aarch64", + exec_compatible_with = [ + "@platforms//os:macos", + "@platforms//cpu:aarch64", + ], + sha256 = "c92131e83bc71474850e667bc4e05fca33662b8feb009a0547aa14e76b40e890", + strip_prefix = "zulu16.28.11-ca-jdk16.0.0-macosx_aarch64", + urls = [ + "https://cdn.azul.com/zulu/bin/zulu16.28.11-ca-jdk16.0.0-macosx_aarch64.tar.gz", + ], + version = "16", +) + +# This must be kept in sync with the top-level WORKSPACE file. +maybe( + remote_java_repository, + name = "remotejdk16_win", + exec_compatible_with = [ + "@platforms//os:windows", + "@platforms//cpu:x86_64", + ], + sha256 = "6cbf98ada27476526a5f6dff79fd5f2c15e2f671818e503bdf741eb6c8fed3d4", + strip_prefix = "zulu16.28.11-ca-jdk16.0.0-win_x64", + urls = [ + "https://cdn.azul.com/zulu/bin/zulu16.28.11-ca-jdk16.0.0-win_x64.zip", + ], + version = "16", +) + {remote_java_tools} {remote_java_tools_linux} {remote_java_tools_windows} diff --git a/src/test/py/bazel/test_base.py b/src/test/py/bazel/test_base.py index 350b8ecc12445a..e82944259d8cb5 100644 --- a/src/test/py/bazel/test_base.py +++ b/src/test/py/bazel/test_base.py @@ -68,6 +68,10 @@ class TestBase(unittest.TestCase): 'remotejdk15_macos_for_testing', 'remotejdk15_macos_aarch64_for_testing', 'remotejdk15_win_for_testing', + 'remotejdk16_linux_for_testing', + 'remotejdk16_macos_for_testing', + 'remotejdk16_macos_aarch64_for_testing', + 'remotejdk16_win_for_testing', 'remote_java_tools_for_testing', 'remote_java_tools_darwin_for_testing', 'remote_java_tools_linux_for_testing', diff --git a/src/test/shell/bazel/BUILD b/src/test/shell/bazel/BUILD index 5a490331ba3c27..a790b540569eff 100644 --- a/src/test/shell/bazel/BUILD +++ b/src/test/shell/bazel/BUILD @@ -206,6 +206,24 @@ sh_test( tags = ["local"], ) +sh_test( + name = "bazel_java16_test", + srcs = ["bazel_java16_test.sh"], + args = [ + # java_tools zip to test + "src/java_tools.zip", + "src/java_tools_prebuilt.zip", + ], + data = [ + ":test-deps", + "//src:java_tools_prebuilt_zip", + "//src:java_tools_zip", + "//src/test/shell/bazel/testdata:jdk_http_archives_filegroup", + "@bazel_tools//tools/bash/runfiles", + ], + tags = ["local"], +) + sh_test( name = "bazel_java_test", # TODO(iirina): Investigate if the 'large' and 'eternal' values still apply. diff --git a/src/test/shell/bazel/bazel_java15_test.sh b/src/test/shell/bazel/bazel_java15_test.sh index d6816943a2aa88..5769ce1852b08a 100755 --- a/src/test/shell/bazel/bazel_java15_test.sh +++ b/src/test/shell/bazel/bazel_java15_test.sh @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -# Tests that bazel runs projects with Java 14 features. +# Tests that bazel runs projects with Java 15 features. # --- begin runfiles.bash initialization --- if [[ ! -d "${RUNFILES_DIR:-/dev/null}" && ! -f "${RUNFILES_MANIFEST_FILE:-/dev/null}" ]]; then diff --git a/src/test/shell/bazel/bazel_java16_test.sh b/src/test/shell/bazel/bazel_java16_test.sh new file mode 100755 index 00000000000000..710337c18e2da5 --- /dev/null +++ b/src/test/shell/bazel/bazel_java16_test.sh @@ -0,0 +1,139 @@ +#!/bin/bash +# +# Copyright 2021 The Bazel Authors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Tests that bazel runs projects with Java 16 features. + +# --- begin runfiles.bash initialization --- +if [[ ! -d "${RUNFILES_DIR:-/dev/null}" && ! -f "${RUNFILES_MANIFEST_FILE:-/dev/null}" ]]; then + if [[ -f "$0.runfiles_manifest" ]]; then + export RUNFILES_MANIFEST_FILE="$0.runfiles_manifest" + elif [[ -f "$0.runfiles/MANIFEST" ]]; then + export RUNFILES_MANIFEST_FILE="$0.runfiles/MANIFEST" + elif [[ -f "$0.runfiles/bazel_tools/tools/bash/runfiles/runfiles.bash" ]]; then + export RUNFILES_DIR="$0.runfiles" + fi +fi +if [[ -f "${RUNFILES_DIR:-/dev/null}/bazel_tools/tools/bash/runfiles/runfiles.bash" ]]; then + source "${RUNFILES_DIR}/bazel_tools/tools/bash/runfiles/runfiles.bash" +elif [[ -f "${RUNFILES_MANIFEST_FILE:-/dev/null}" ]]; then + source "$(grep -m1 "^bazel_tools/tools/bash/runfiles/runfiles.bash " \ + "$RUNFILES_MANIFEST_FILE" | cut -d ' ' -f 2-)" +else + echo >&2 "ERROR: cannot find @bazel_tools//tools/bash/runfiles:runfiles.bash" + exit 1 +fi +# --- end runfiles.bash initialization --- + +source "$(rlocation "io_bazel/src/test/shell/integration_test_setup.sh")" \ + || { echo "integration_test_setup.sh not found!" >&2; exit 1; } + +case "$(uname -s | tr [:upper:] [:lower:])" in +msys*|mingw*|cygwin*) + declare -r is_windows=true + ;; +*) + declare -r is_windows=false + ;; +esac + +if "$is_windows"; then + export MSYS_NO_PATHCONV=1 + export MSYS2_ARG_CONV_EXCL="*" +fi + +JAVA_TOOLS_ZIP="$1"; shift +JAVA_TOOLS_PREBUILT_ZIP="$1"; shift + +echo "JAVA_TOOLS_ZIP=$JAVA_TOOLS_ZIP" + + +JAVA_TOOLS_RLOCATION=$(rlocation io_bazel/$JAVA_TOOLS_ZIP) + +if "$is_windows"; then + JAVA_TOOLS_ZIP_FILE_URL="file:///${JAVA_TOOLS_RLOCATION}" + JAVA_TOOLS_PREBUILT_ZIP_FILE_URL="file:///$(rlocation io_bazel/$JAVA_TOOLS_PREBUILT_ZIP)" +else + JAVA_TOOLS_ZIP_FILE_URL="file://${JAVA_TOOLS_RLOCATION}" + JAVA_TOOLS_PREBUILT_ZIP_FILE_URL="file://$(rlocation io_bazel/$JAVA_TOOLS_PREBUILT_ZIP)" +fi +JAVA_TOOLS_ZIP_FILE_URL=${JAVA_TOOLS_ZIP_FILE_URL:-} +JAVA_TOOLS_PREBUILT_ZIP_FILE_URL=${JAVA_TOOLS_PREBUILT_ZIP_FILE_URL:-} + + +function set_up() { + cat >>WORKSPACE <> WORKSPACE +} + +# Java source files version shall match --java_language_version_flag version. +function test_java16_text_block() { + mkdir -p java/main + cat >java/main/BUILD <java/main/Javac16Example.java <"${TEST_log}" \ + && fail "Running with --java_language_version=14 unexpectedly succeeded." + + bazel run java/main:Javac16Example --java_language_version=11 --java_runtime_version=11 \ + --test_output=all --verbose_failures &>"${TEST_log}" \ + && fail "Running with --java_language_version=11 unexpectedly succeeded." + + bazel run java/main:Javac16Example --java_language_version=16 --java_runtime_version=16 \ + --test_output=all --verbose_failures &>"${TEST_log}" \ + || fail "Running with --java_language_version=16 failed" + expect_log "^Hello,\$" + expect_log "^World\$" +} + + +run_suite "Tests Java 16 language features" diff --git a/src/test/shell/bazel/testdata/jdk_http_archives.tmpl b/src/test/shell/bazel/testdata/jdk_http_archives.tmpl index a26b719a60610b..598695f61d54df 100644 --- a/src/test/shell/bazel/testdata/jdk_http_archives.tmpl +++ b/src/test/shell/bazel/testdata/jdk_http_archives.tmpl @@ -100,3 +100,60 @@ exports_files(["WORKSPACE"], visibility = ["//visibility:public"]) ], ) +#################################### JDK 16 #################################### +# This must be kept in sync with the top-level WORKSPACE file. +http_archive( + name = "openjdk16_linux_archive", + build_file_content = """ +java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public']) +exports_files(["WORKSPACE"], visibility = ["//visibility:public"]) +""", + sha256 = "236b5ea97aff3cb312e743848d7efa77faf305170e41371a732ca93c1b797665", + strip_prefix = "zulu16.28.11-ca-jdk16.0.0-linux_x64", + urls = [ + "https://cdn.azul.com/zulu/bin/zulu16.28.11-ca-jdk16.0.0-linux_x64.tar.gz" + ], +) + +# This must be kept in sync with src/test/shell/bazel/testdata/jdk_http_archives. +http_archive( + name = "openjdk16_darwin_archive", + build_file_content = """ +java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public']) +exports_files(["WORKSPACE"], visibility = ["//visibility:public"]) +""", + sha256 = "6d47ef22dc56ce1f5a102ed39e21d9a97320f0bb786818e2c686393109d79bc5", + strip_prefix = "zulu16.28.11-ca-jdk16.0.0-macosx_x64", + urls = [ + "https://cdn.azul.com/zulu/bin/zulu16.28.11-ca-jdk16.0.0-macosx_x64.tar.gz", + ], +) + +# This must be kept in sync with src/test/shell/bazel/testdata/jdk_http_archives. +http_archive( + name = "openjdk16_darwin_aarch64_archive", + build_file_content = """ +java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public']) +exports_files(["WORKSPACE"], visibility = ["//visibility:public"]) +""", + sha256 = "c92131e83bc71474850e667bc4e05fca33662b8feb009a0547aa14e76b40e890", + strip_prefix = "zulu16.28.11-ca-jdk16.0.0-macosx_aarch64", + urls = [ + "https://cdn.azul.com/zulu/bin/zulu16.28.11-ca-jdk16.0.0-macosx_aarch64.tar.gz", + ], +) + +# This must be kept in sync with src/test/shell/bazel/testdata/jdk_http_archives. +http_archive( + name = "openjdk16_windows_archive", + build_file_content = """ +java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public']) +exports_files(["WORKSPACE"], visibility = ["//visibility:public"]) +""", + sha256 = "6cbf98ada27476526a5f6dff79fd5f2c15e2f671818e503bdf741eb6c8fed3d4", + strip_prefix = "zulu16.28.11-ca-jdk16.0.0-win_x64", + urls = [ + "https://cdn.azul.com/zulu/bin/zulu16.28.11-ca-jdk16.0.0-win_x64.zip", + ], +) + diff --git a/src/test/shell/testenv.sh.tmpl b/src/test/shell/testenv.sh.tmpl index 3b8d3ad1aaa4cb..d14bf59dfe7d46 100755 --- a/src/test/shell/testenv.sh.tmpl +++ b/src/test/shell/testenv.sh.tmpl @@ -293,6 +293,10 @@ EOF "openjdk15_darwin_aarch64_archive" "openjdk15_linux_archive" "openjdk15_windows_archive" + "openjdk16_darwin_archive" + "openjdk16_darwin_aarch64_archive" + "openjdk16_linux_archive" + "openjdk16_windows_archive" "openjdk_linux_aarch64_minimal" "openjdk_linux_minimal" "openjdk_macos_x86_64_minimal" @@ -318,6 +322,10 @@ EOF "remotejdk15_macos_for_testing" "remotejdk15_macos_aarch64_for_testing" "remotejdk15_win_for_testing" + "remotejdk16_linux_for_testing" + "remotejdk16_macos_for_testing" + "remotejdk16_macos_aarch64_for_testing" + "remotejdk16_win_for_testing" "rules_cc" "rules_java" "rules_proto" diff --git a/tools/jdk/BUILD.tools b/tools/jdk/BUILD.tools index 7e5fac5c402adf..dbf6b80737ff33 100644 --- a/tools/jdk/BUILD.tools +++ b/tools/jdk/BUILD.tools @@ -383,6 +383,15 @@ default_java_toolchain( target_version = "15", ) +# A toolchain that targets java 16. +default_java_toolchain( + name = "toolchain_jdk_16", + configuration = dict(), + java_runtime = "@bazel_tools//tools/jdk:remotejdk_16", + source_version = "16", + target_version = "16", +) + # Deprecated, do not use. # It will be removed after migration to Java toolchain resolution. default_java_toolchain( @@ -438,6 +447,10 @@ _JDKS = [ "remotejdk15_macos_aarch64", "remotejdk15_win", "remotejdk15_linux", + "remotejdk16_macos", + "remotejdk16_macos_aarch64", + "remotejdk16_win", + "remotejdk16_linux", ] [ @@ -485,6 +498,22 @@ java_runtime_version_alias( visibility = ["//visibility:public"], ) +java_runtime_version_alias( + name = "remotejdk_16", + runtime_version = "remotejdk_16", + selected_java_runtime = select( + { + "//src/conditions:darwin_x86_64": ":remotejdk16_macos", + "//src/conditions:darwin_arm64": ":remotejdk16_macos_aarch64", + "//src/conditions:windows": ":remotejdk16_win", + "//src/conditions:linux_x86_64": ":remotejdk16_linux", + }, + no_match_error = "Could not find a JDK for host execution environment, please explicitly" + + " provide one using `--host_javabase.`", + ), + visibility = ["//visibility:public"], +) + java_runtime_version_alias( name = "jdk_8", runtime_version = "8", diff --git a/tools/jdk/default_java_toolchain.bzl b/tools/jdk/default_java_toolchain.bzl index 76b193b3d44c98..bc41484ad76711 100644 --- a/tools/jdk/default_java_toolchain.bzl +++ b/tools/jdk/default_java_toolchain.bzl @@ -26,6 +26,8 @@ BASE_JDK9_JVM_OPTS = [ "--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.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.file=ALL-UNNAMED",