Skip to content

Commit

Permalink
Switch the embedded JDK to version 17.
Browse files Browse the repository at this point in the history
This allows removing the "cached" allmodules and minimized jdk archives, since `jlink` is deterministic in newer JDK versions.

Fixes bazelbuild#14785.

Closes bazelbuild#16541.

PiperOrigin-RevId: 489464974
Change-Id: If5bb457d20cf79b70ba03b862eff302ef4d296d2
  • Loading branch information
benjaminp authored and copybara-github committed Nov 18, 2022
1 parent 44918c5 commit 66c22f4
Show file tree
Hide file tree
Showing 10 changed files with 88 additions and 207 deletions.
72 changes: 1 addition & 71 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
workspace(name = "io_bazel")

load("//tools/build_defs/repo:http.bzl", "http_archive", "http_file", "http_jar")
load("//tools/build_defs/repo:http.bzl", "http_archive", "http_jar")
load("//:distdir.bzl", "dist_http_archive", "dist_http_file", "distdir_tar")
load("//:distdir_deps.bzl", "DIST_DEPS")

Expand Down Expand Up @@ -145,44 +145,16 @@ distdir_tar(
)

# OpenJDK distributions used to create a version of Bazel bundled with the OpenJDK.
http_file(
name = "openjdk_linux",
downloaded_file_path = "zulu-linux.tar.gz",
sha256 = "65bfe4e0ffa74a680ee4410db46b17e30cd9397b664a92a886599fe1f3530969",
urls = ["https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-linux_x64-linux_x64-allmodules-b23d4e05466f2aa1fdcd72d3d3a8e962206b64bf-1581689070.tar.gz"],
)

dist_http_file(
name = "openjdk_linux_vanilla",
downloaded_file_path = "zulu-linux-vanilla.tar.gz",
)

http_file(
name = "openjdk_linux_minimal",
downloaded_file_path = "zulu-linux-minimal.tar.gz",
sha256 = "91f7d52f695c681d4e21499b4319d548aadef249a6b3053e306308992e1e29ae",
urls = ["https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-linux_x64-minimal-b23d4e05466f2aa1fdcd72d3d3a8e962206b64bf-1581689068.tar.gz"],
)

http_file(
name = "openjdk_linux_aarch64",
downloaded_file_path = "zulu-linux-aarch64.tar.gz",
sha256 = "6b245793087300db3ee82ab0d165614f193a73a60f2f011e347756c1e6ca5bac",
urls = ["https://mirror.bazel.build/openjdk/azul-zulu11.37.48-ca-jdk11.0.6/zulu11.37.48-ca-jdk11.0.6-linux_aarch64-allmodules-b23d4e05466f2aa1fdcd72d3d3a8e962206b64bf-1581690750.tar.gz"],
)

dist_http_file(
name = "openjdk_linux_aarch64_vanilla",
downloaded_file_path = "zulu-linux-aarch64-vanilla.tar.gz",
)

http_file(
name = "openjdk_linux_aarch64_minimal",
downloaded_file_path = "zulu-linux-aarch64-minimal.tar.gz",
sha256 = "06f6520a877704c77614bcfc4f846cc7cbcbf5eaad149bf7f19f4f16e285c9de",
urls = ["https://mirror.bazel.build/openjdk/azul-zulu11.37.48-ca-jdk11.0.6/zulu11.37.48-ca-jdk11.0.6-linux_aarch64-minimal-b23d4e05466f2aa1fdcd72d3d3a8e962206b64bf-1581690750.tar.gz"],
)

dist_http_file(
name = "openjdk_linux_ppc64le_vanilla",
downloaded_file_path = "adoptopenjdk-ppc64le-vanilla.tar.gz",
Expand All @@ -193,51 +165,16 @@ dist_http_file(
downloaded_file_path = "adoptopenjdk-s390x-vanilla.tar.gz",
)

http_file(
name = "openjdk_macos_x86_64",
downloaded_file_path = "zulu-macos.tar.gz",
sha256 = "8e283cfd23c7555be8e17295ed76eb8f00324c88ab904b8de37bbe08f90e569b",
urls = ["https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-macosx_x64-allmodules-b23d4e05466f2aa1fdcd72d3d3a8e962206b64bf-1581689066.tar.gz"],
)

dist_http_file(
name = "openjdk_macos_x86_64_vanilla",
downloaded_file_path = "zulu-macos-vanilla.tar.gz",
)

http_file(
name = "openjdk_macos_x86_64_minimal",
downloaded_file_path = "zulu-macos-minimal.tar.gz",
sha256 = "1bacb1c07035d4066d79f0b65b4ea0ebd1954f3662bdfe3618da382ac8fd23a6",
urls = ["https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-macosx_x64-minimal-b23d4e05466f2aa1fdcd72d3d3a8e962206b64bf-1581689063.tar.gz"],
)

http_file(
name = "openjdk_macos_aarch64",
downloaded_file_path = "zulu-macos-aarch64.tar.gz",
sha256 = "a900ef793cb34b03ac5d93ea2f67291b6842e99d500934e19393a8d8f9bfa6ff",
urls = ["https://mirror.bazel.build/openjdk/azul-zulu11.45.27-ca-jdk11.0.10/zulu11.45.27-ca-jdk11.0.10-macosx_aarch64-allmodules-1611665569.tar.gz"],
)

dist_http_file(
name = "openjdk_macos_aarch64_vanilla",
downloaded_file_path = "zulu-macos-aarch64-vanilla.tar.gz",
)

http_file(
name = "openjdk_macos_aarch64_minimal",
downloaded_file_path = "zulu-macos-aarch64-minimal.tar.gz",
sha256 = "f4f606926e6deeaa8b8397e299313d9df87642fe464b0ccf1ed0432aeb00640b",
urls = ["https://mirror.bazel.build/openjdk/azul-zulu11.45.27-ca-jdk11.0.10/zulu11.45.27-ca-jdk11.0.10-macosx_aarch64-minimal-1611665562.tar.gz"],
)

http_file(
name = "openjdk_win",
downloaded_file_path = "zulu-win.zip",
sha256 = "8e1604b3a27dcf639bc6d1a73103f1211848139e4cceb081d0a74a99e1e6f995",
urls = ["https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64-allmodules-b23d4e05466f2aa1fdcd72d3d3a8e962206b64bf-1581689080.zip"],
)

dist_http_file(
name = "openjdk_win_vanilla",
downloaded_file_path = "zulu-win-vanilla.zip",
Expand All @@ -248,13 +185,6 @@ dist_http_file(
downloaded_file_path = "zulu-win-arm64.zip",
)

http_file(
name = "openjdk_win_minimal",
downloaded_file_path = "zulu-win-minimal.zip",
sha256 = "b90a713c9c2d9ea23cad44d2c2dfcc9af22faba9bde55dedc1c3bb9f556ac1ae",
urls = ["https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64-minimal-b23d4e05466f2aa1fdcd72d3d3a8e962206b64bf-1581689080.zip"],
)

dist_http_archive(
name = "bazelci_rules",
patch_cmds = EXPORT_WORKSPACE_IN_BUILD_FILE,
Expand Down
77 changes: 64 additions & 13 deletions distdir_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,6 @@ DIST_DEPS = {
"aliases": [
"remotejdk11_linux_for_testing",
"openjdk11_linux_archive",
"openjdk_linux_vanilla",
],
"archive": "zulu11.56.19-ca-jdk11.0.15-linux_x64.tar.gz",
"sha256": "e064b61d93304012351242bf0823c6a2e41d9e28add7ea7f05378b7243d34247",
Expand All @@ -409,7 +408,6 @@ DIST_DEPS = {
"remotejdk11_linux_aarch64": {
"aliases": [
"remotejdk11_linux_aarch64_for_testing",
"openjdk_linux_aarch64_vanilla",
],
"archive": "zulu11.56.19-ca-jdk11.0.15-linux_aarch64.tar.gz",
"sha256": "fc7c41a0005180d4ca471c90d01e049469e0614cf774566d4cf383caa29d1a97",
Expand All @@ -423,7 +421,6 @@ DIST_DEPS = {
"remotejdk11_linux_ppc64le": {
"aliases": [
"remotejdk11_linux_ppc64le_for_testing",
"openjdk_linux_ppc64le_vanilla",
],
"sha256": "a8fba686f6eb8ae1d1a9566821dbd5a85a1108b96ad857fdbac5c1e4649fc56f",
"strip_prefix": "jdk-11.0.15+10",
Expand All @@ -436,7 +433,6 @@ DIST_DEPS = {
"remotejdk11_linux_s390x": {
"aliases": [
"remotejdk11_linux_s390x_for_testing",
"openjdk_linux_s390x_vanilla",
],
"sha256": "a58fc0361966af0a5d5a31a2d8a208e3c9bb0f54f345596fd80b99ea9a39788b",
"strip_prefix": "jdk-11.0.15+10",
Expand All @@ -449,7 +445,6 @@ DIST_DEPS = {
"remotejdk11_macos": {
"aliases": [
"remotejdk11_macos_for_testing",
"openjdk_macos_x86_64_vanilla",
"openjdk11_darwin_archive",
],
"archive": "zulu11.56.19-ca-jdk11.0.15-macosx_x64.tar.gz",
Expand All @@ -463,7 +458,6 @@ DIST_DEPS = {
},
"remotejdk11_macos_aarch64": {
"aliases": [
"openjdk_macos_aarch64_vanilla",
"remotejdk11_macos_aarch64_for_testing",
"openjdk11_darwin_aarch64_archive",
],
Expand All @@ -480,7 +474,6 @@ DIST_DEPS = {
"aliases": [
"remotejdk11_win_for_testing",
"openjdk11_windows_archive",
"openjdk_win_vanilla",
],
"archive": "zulu11.56.19-ca-jdk11.0.15-win_x64.zip",
"sha256": "a106c77389a63b6bd963a087d5f01171bd32aa3ee7377ecef87531390dcb9050",
Expand All @@ -504,7 +497,10 @@ DIST_DEPS = {
"https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.30.15-ca-jdk17.0.1-win_aarch64.zip",
"https://cdn.azul.com/zulu/bin/zulu17.30.15-ca-jdk17.0.1-win_aarch64.zip",
],
"used_in": ["test_WORKSPACE_files"],
"used_in": [
"additional_distfiles",
"test_WORKSPACE_files",
],
},
"remotejdk11_win_arm64": {
"aliases": [
Expand All @@ -523,19 +519,25 @@ DIST_DEPS = {
"aliases": [
"remotejdk17_linux_for_testing",
"openjdk17_linux_archive",
"openjdk_linux_vanilla",
],
"archive": "zulu17.32.13-ca-jdk17.0.2-linux_x64.tar.gz",
"sha256": "73d5c4bae20325ca41b606f7eae64669db3aac638c5b3ead4a975055846ad6de",
"strip_prefix": "zulu17.32.13-ca-jdk17.0.2-linux_x64",
"urls": [
"https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-linux_x64.tar.gz",
"https://cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-linux_x64.tar.gz",
],
"used_in": [],
"used_in": [
"additional_distfiles",
"test_WORKSPACE_files",
],
},
"remotejdk17_linux_aarch64": {
"aliases": [
"remotejdk17_linux_aarch64_for_testing",
"openjdk17_linux_aarch64_archive",
"openjdk_linux_aarch64_vanilla",
],
"archive": "zulu17.32.13-ca-jdk17.0.2-linux_aarch64.tar.gz",
"sha256": "2b8066bbdbc5cff422bb6b6db1b8f8d362b576340cce8492f1255502af632b06",
Expand All @@ -544,46 +546,95 @@ DIST_DEPS = {
"https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-linux_aarch64.tar.gz",
"https://cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-linux_aarch64.tar.gz",
],
"used_in": ["test_WORKSPACE_files"],
"used_in": [
"additional_distfiles",
"test_WORKSPACE_files",
],
},
"remotejdk17_linux_s390x": {
"aliases": [
"remotejdk17_linux_s390x_for_testing",
"openjdk_linux_s390x_vanilla",
],
"archive": "OpenJDK17U-jdk_s390x_linux_hotspot_17.0.4.1_1.tar.gz",
"sha256": "fdc82f4b06c880762503b0cb40e25f46cf8190d06011b3b768f4091d3334ef7f",
"strip_prefix": "jdk-17.0.4.1+1",
"urls": [
"https://mirror.bazel.build/github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.4.1%2B1/OpenJDK17U-jdk_s390x_linux_hotspot_17.0.4.1_1.tar.gz",
"https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.4.1%2B1/OpenJDK17U-jdk_s390x_linux_hotspot_17.0.4.1_1.tar.gz",
],
"used_in": [
"additional_distfiles",
"test_WORKSPACE_files",
],
},
"remotejdk17_linux_ppc64le": {
"aliases": [
"remotejdk17_linux_ppc64le_for_testing",
"openjdk_linux_ppc64le_vanilla",
],
"archive": "OpenJDK17U-jdk_ppc64le_linux_hotspot_17.0.4.1_1.tar.gz",
"sha256": "cbedd0a1428b3058d156e99e8e9bc8769e0d633736d6776a4c4d9136648f2fd1",
"strip_prefix": "jdk-17.0.4.1+1",
"urls": [
"https://mirror.bazel.build/github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.4.1%2B1/OpenJDK17U-jdk_ppc64le_linux_hotspot_17.0.4.1_1.tar.gz",
"https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.4.1%2B1/OpenJDK17U-jdk_ppc64le_linux_hotspot_17.0.4.1_1.tar.gz",
],
"used_in": ["additional_distfiles"],
},
"remotejdk17_macos": {
"aliases": [
"remotejdk17_macos_for_testing",
"openjdk17_darwin_archive",
"openjdk_macos_x86_64_vanilla",
],
"archive": "zulu17.32.13-ca-jdk17.0.2-macosx_x64.tar.gz",
"sha256": "89d04b2d99b05dcb25114178e65f6a1c5ca742e125cab0a63d87e7e42f3fcb80",
"strip_prefix": "zulu17.32.13-ca-jdk17.0.2-macosx_x64",
"urls": [
"https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-macosx_x64.tar.gz",
"https://cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-macosx_x64.tar.gz",
],
"used_in": [],
"used_in": [
"additional_distfiles",
"test_WORKSPACE_files",
],
},
"remotejdk17_macos_aarch64": {
"aliases": [
"remotejdk17_macos_aarch64_for_testing",
"openjdk17_darwin_aarch64_archive",
"openjdk_macos_aarch64_vanilla",
],
"archive": "zulu17.32.13-ca-jdk17.0.2-macosx_aarch64.tar.gz",
"sha256": "54247dde248ffbcd3c048675504b1c503b81daf2dc0d64a79e353c48d383c977",
"strip_prefix": "zulu17.32.13-ca-jdk17.0.2-macosx_aarch64",
"urls": [
"https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-macosx_aarch64.tar.gz",
"https://cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-macosx_aarch64.tar.gz",
],
"used_in": [],
"used_in": [
"additional_distfiles",
"test_WORKSPACE_files",
],
},
"remotejdk17_win": {
"aliases": [
"remotejdk17_win_for_testing",
"openjdk17_windows_archive",
"openjdk_win_vanilla",
],
"archive": "zulu17.32.13-ca-jdk17.0.2-win_x64.zip",
"sha256": "e965aa0ea7a0661a3446cf8f10ee00684b851f883b803315289f26b4aa907fdb",
"strip_prefix": "zulu17.32.13-ca-jdk17.0.2-win_x64",
"urls": [
"https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-win_x64.zip",
"https://cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-win_x64.zip",
],
"used_in": [],
"used_in": [
"additional_distfiles",
"test_WORKSPACE_files",
],
},
"remotejdk18_linux_aarch64": {
"aliases": [
Expand Down
Loading

0 comments on commit 66c22f4

Please sign in to comment.