Skip to content

Commit

Permalink
Avoid downloading x86_64 remote JDK on Apple Silicon
Browse files Browse the repository at this point in the history
Related: #11628

Closes #12919.

PiperOrigin-RevId: 354281564
  • Loading branch information
meteorcloudy authored and copybara-github committed Jan 28, 2021
1 parent 4d0b21b commit ecddf60
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tools/jdk/BUILD.tools
Original file line number Diff line number Diff line change
Expand Up @@ -431,12 +431,14 @@ py_test(
# Aliases for JDKs, so that they are only downloaded when needed.
_JDKS = [
"remotejdk11_macos",
"remotejdk11_macos_aarch64",
"remotejdk11_win",
"remotejdk11_linux_aarch64",
"remotejdk11_linux",
"remotejdk11_linux_ppc64le",
"remotejdk11_linux_s390x",
"remotejdk15_macos",
"remotejdk15_macos_aarch64",
"remotejdk15_win",
"remotejdk15_linux",
]
Expand All @@ -456,7 +458,8 @@ java_runtime_version_alias(
runtime_version = "remotejdk_11",
selected_java_runtime = select(
{
"//src/conditions:darwin": ":remotejdk11_macos",
"//src/conditions:darwin_x86_64": ":remotejdk11_macos",
"//src/conditions:darwin_arm64": ":remotejdk11_macos_aarch64",
"//src/conditions:windows": ":remotejdk11_win",
"//src/conditions:linux_aarch64": ":remotejdk11_linux_aarch64",
"//src/conditions:linux_x86_64": ":remotejdk11_linux",
Expand All @@ -474,7 +477,8 @@ java_runtime_version_alias(
runtime_version = "remotejdk_15",
selected_java_runtime = select(
{
"//src/conditions:darwin": ":remotejdk15_macos",
"//src/conditions:darwin_x86_64": ":remotejdk15_macos",
"//src/conditions:darwin_arm64": ":remotejdk15_macos_aarch64",
"//src/conditions:windows": ":remotejdk15_win",
"//src/conditions:linux_x86_64": ":remotejdk15_linux",
},
Expand Down

0 comments on commit ecddf60

Please sign in to comment.