Skip to content

Commit

Permalink
Add native support for Apple Silicon
Browse files Browse the repository at this point in the history
After this PR, we can use a x86 version of Bazel to build an ARM64 Bazel binary for Apple Silicon by
```
bazel build --cpu=darwin_arm64 //src:bazel
```
The Bazel client, embedded tools and embedded JDK are all native ARM64 binaries.

Changes in this PR:
1. Add OpenJDK definitions for ARM64 macOS
2. Manually created the embedded JDK binaries on an Apple Silicon machine and uploaded them to the bazel mirror site.
3. AutoCpuConverter.java: identify the cpu value correctly
4. cc_toolchain_config.bzl: Explicitly specify the target platform also in the x86 cc toolchain, so that we can also do cross-platform compile from ARM64 to x86.

With the native arm64 Bazel binary, building Bazel itself takes only half of the time compared with the x86 Bazel binary on an Apple DTK machine:
```
$ bazel build --cpu=darwin_arm64 --disk_cache= --repository_cache= //src:bazel
Starting local Bazel server and connecting to it...
...
Target //src:bazel up-to-date:
  bazel-bin/src/bazel
INFO: Elapsed time: 1044.462s, Critical Path: 180.08s
INFO: 2984 processes: 179 internal, 2092 darwin-sandbox, 1 local, 712 worker.
INFO: Build completed successfully, 2984 total actions

cp  ./bazel-bin/src/bazel ~/bin/bazel-arm64

$ bazel-arm64 clean --expunge

$ bazel-arm64 build --disk_cache= --repository_cache= //src:bazel
Starting local Bazel server and connecting to it...
...
Target //src:bazel up-to-date:
  bazel-bin/src/bazel
INFO: Elapsed time: 464.470s, Critical Path: 114.88s
INFO: 2984 processes: 179 internal, 2092 darwin-sandbox, 1 local, 712 worker.
INFO: Build completed successfully, 2984 total actions

```

Closes: bazelbuild#11628

Closes bazelbuild#12900.

PiperOrigin-RevId: 354058336

Revert default cpu value on x86 macOS to "darwin"

Many downstream projects are still depending on the default cpu value
on x86 macOS being "darwin" instead of "darwin_x86_64"

https://buildkite.com/bazel/bazel-auto-sheriff-face-with-cowboy-hat/builds/412

Related: bazelbuild#11628

Closes bazelbuild#12918.

PiperOrigin-RevId: 354279409

Update platform version to 0.0.4

Use configuration flags for //src/conditions:darwin_arm64

Partially reverts 6d637f4, to allow
cross-compiling Bazel from darwin_x86_64 to darwin_arm64 with
the `--cpu=darwin_arm64` flag.

The only source that is different between darwin_x86_64 and darwin_arm64
now is the embedded JDK.

Closes bazelbuild#12653.

PiperOrigin-RevId: 346298051

Make sure Bazel selects correct remote JDK on Apple Silicon
  • Loading branch information
meteorcloudy authored and philwo committed Apr 20, 2021
1 parent b60a8ad commit 270f00d
Show file tree
Hide file tree
Showing 12 changed files with 244 additions and 22 deletions.
111 changes: 98 additions & 13 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ distdir_tar(
# bazelbuild/bazel-skylib
"bazel-skylib-1.0.3.tar.gz",
# bazelbuild/platforms
"platforms-0.0.2.tar.gz",
"platforms-0.0.4.tar.gz",
# bazelbuild/rules_java
"7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip",
# bazelbuild/rules_cc
Expand Down Expand Up @@ -201,7 +201,7 @@ distdir_tar(
# bazelbuild/bazel-skylib
"bazel-skylib-1.0.3.tar.gz": "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
# bazelbuild/platforms
"platforms-0.0.2.tar.gz": "48a2d8d343863989c232843e01afc8a986eb8738766bfd8611420a7db8f6f0c3",
"platforms-0.0.4.tar.gz": "079945598e4b6cc075846f7fd6a9d0857c33a7afc0de868c2ccb96405225135d",
# bazelbuild/rules_java
"7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip": "bc81f1ba47ef5cc68ad32225c3d0e70b8c6f6077663835438da8d5733f917598",
# bazelbuild/rules_cc
Expand Down Expand Up @@ -263,9 +263,9 @@ distdir_tar(
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
],
# bazelbuild/platforms
"platforms-0.0.2.tar.gz": [
"https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.2/platforms-0.0.2.tar.gz",
"https://github.com/bazelbuild/platforms/releases/download/0.0.2/platforms-0.0.2.tar.gz",
"platforms-0.0.4.tar.gz": [
"https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.4/platforms-0.0.4.tar.gz",
"https://github.com/bazelbuild/platforms/releases/download/0.0.4/platforms-0.0.4.tar.gz",
],
# bazelbuild/rules_java
"7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip": [
Expand Down Expand Up @@ -409,6 +409,30 @@ http_file(
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"],
)

http_file(
name = "openjdk_macos_aarch64_vanilla",
downloaded_file_path = "zulu-macos-aarch64-vanilla.tar.gz",
sha256 = "3dcc636e64ae58b922269c2dc9f20f6f967bee90e3f6847d643c4a566f1e8d8a",
urls = [
"https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu11.45.27-ca-jdk11.0.10-macosx_aarch64.tar.gz",
"https://cdn.azul.com/zulu/bin/zulu11.45.27-ca-jdk11.0.10-macosx_aarch64.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",
Expand Down Expand Up @@ -552,12 +576,13 @@ distdir_tar(
"zulu11.37.17-ca-jdk11.0.6-linux_x64.tar.gz",
"zulu11.37.48-ca-jdk11.0.6-linux_aarch64.tar.gz",
"zulu11.37.17-ca-jdk11.0.6-macosx_x64.tar.gz",
"zulu11.45.27-ca-jdk11.0.10-macosx_aarch64.tar.gz",
"zulu11.37.17-ca-jdk11.0.6-win_x64.zip",
"android_tools_pkg-0.19.0rc3.tar.gz",
# bazelbuild/bazel-skylib
"bazel-skylib-1.0.3.tar.gz",
# bazelbuild/platforms
"platforms-0.0.2.tar.gz",
"platforms-0.0.4.tar.gz",
# bazelbuild/rules_java
"7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip",
# bazelbuild/rules_cc
Expand Down Expand Up @@ -586,12 +611,13 @@ distdir_tar(
"zulu11.37.17-ca-jdk11.0.6-linux_x64.tar.gz": "360626cc19063bc411bfed2914301b908a8f77a7919aaea007a977fa8fb3cde1",
"zulu11.37.48-ca-jdk11.0.6-linux_aarch64.tar.gz": "a452f1b9682d9f83c1c14e54d1446e1c51b5173a3a05dcb013d380f9508562e4",
"zulu11.37.17-ca-jdk11.0.6-macosx_x64.tar.gz": "e1fe56769f32e2aaac95e0a8f86b5a323da5af3a3b4bba73f3086391a6cc056f",
"zulu11.45.27-ca-jdk11.0.10-macosx_aarch64.tar.gz": "3dcc636e64ae58b922269c2dc9f20f6f967bee90e3f6847d643c4a566f1e8d8a",
"zulu11.37.17-ca-jdk11.0.6-win_x64.zip": "a9695617b8374bfa171f166951214965b1d1d08f43218db9a2a780b71c665c18",
"android_tools_pkg-0.19.0rc3.tar.gz": "ea5c0589a01e2a9f43c20e5c145d3530e3b3bdbe7322789bc5da38d0ca49b837",
# bazelbuild/bazel-skylib
"bazel-skylib-1.0.3.tar.gz": "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
# bazelbuild/platforms
"platforms-0.0.2.tar.gz": "48a2d8d343863989c232843e01afc8a986eb8738766bfd8611420a7db8f6f0c3",
"platforms-0.0.4.tar.gz": "079945598e4b6cc075846f7fd6a9d0857c33a7afc0de868c2ccb96405225135d",
# bazelbuild/rules_java
"7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip": "bc81f1ba47ef5cc68ad32225c3d0e70b8c6f6077663835438da8d5733f917598",
# bazelbuild/rules_cc
Expand Down Expand Up @@ -619,6 +645,7 @@ distdir_tar(
"zulu11.37.17-ca-jdk11.0.6-linux_x64.tar.gz": ["https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-linux_x64.tar.gz"],
"zulu11.37.48-ca-jdk11.0.6-linux_aarch64.tar.gz": ["https://mirror.bazel.build/openjdk/azul-zulu11.37.48-ca-jdk11.0.6/zulu11.37.48-ca-jdk11.0.6-linux_aarch64.tar.gz"],
"zulu11.37.17-ca-jdk11.0.6-macosx_x64.tar.gz": ["https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-macosx_x64.tar.gz"],
"zulu11.45.27-ca-jdk11.0.10-macosx_aarch64.tar.gz": ["https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu11.45.27-ca-jdk11.0.10-macosx_aarch64.tar.gz"],
"zulu11.37.17-ca-jdk11.0.6-win_x64.zip": ["https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64.zip"],
"android_tools_pkg-0.19.0rc3.tar.gz": [
"https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.19.0rc3.tar.gz",
Expand All @@ -629,9 +656,9 @@ distdir_tar(
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
],
# bazelbuild/platforms
"platforms-0.0.2.tar.gz": [
"https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.2/platforms-0.0.2.tar.gz",
"https://github.com/bazelbuild/platforms/releases/download/0.0.2/platforms-0.0.2.tar.gz",
"platforms-0.0.4.tar.gz": [
"https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.4/platforms-0.0.4.tar.gz",
"https://github.com/bazelbuild/platforms/releases/download/0.0.4/platforms-0.0.4.tar.gz",
],
# bazelbuild/rules_java
"7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip": [
Expand Down Expand Up @@ -739,10 +766,10 @@ http_archive(

http_archive(
name = "platforms",
sha256 = "48a2d8d343863989c232843e01afc8a986eb8738766bfd8611420a7db8f6f0c3",
sha256 = "079945598e4b6cc075846f7fd6a9d0857c33a7afc0de868c2ccb96405225135d",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.2/platforms-0.0.2.tar.gz",
"https://github.com/bazelbuild/platforms/releases/download/0.0.2/platforms-0.0.2.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.4/platforms-0.0.4.tar.gz",
"https://github.com/bazelbuild/platforms/releases/download/0.0.4/platforms-0.0.4.tar.gz",
],
)

Expand Down Expand Up @@ -827,6 +854,20 @@ http_archive(
urls = ["https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-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 = "remotejdk11_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 = "3dcc636e64ae58b922269c2dc9f20f6f967bee90e3f6847d643c4a566f1e8d8a",
strip_prefix = "zulu11.45.27-ca-jdk11.0.10-macosx_aarch64",
urls = [
"https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu11.45.27-ca-jdk11.0.10-macosx_aarch64.tar.gz",
"https://cdn.azul.com/zulu/bin/zulu11.45.27-ca-jdk11.0.10-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 = "remotejdk11_win_for_testing",
Expand Down Expand Up @@ -899,6 +940,20 @@ 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 = "remotejdk15_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 = "2613c3f15eef6b6ecd0fd102da92282b985e4573905dc902f1783d8059c1efc5",
strip_prefix = "zulu15.29.15-ca-jdk15.0.2-macosx_aarch64",
urls = [
"https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu15.29.15-ca-jdk15.0.2-macosx_aarch64.tar.gz",
"https://cdn.azul.com/zulu/bin/zulu15.29.15-ca-jdk15.0.2-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 = "remotejdk15_win_for_testing",
Expand Down Expand Up @@ -1006,6 +1061,21 @@ exports_files(["WORKSPACE"], visibility = ["//visibility:public"])
urls = ["https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-macosx_x64.tar.gz"],
)

# This must be kept in sync with src/test/shell/bazel/testdata/jdk_http_archives.
http_archive(
name = "openjdk11_darwin_aarch64_archive",
build_file_content = """
java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])
exports_files(["WORKSPACE"], visibility = ["//visibility:public"])
""",
sha256 = "3dcc636e64ae58b922269c2dc9f20f6f967bee90e3f6847d643c4a566f1e8d8a",
strip_prefix = "zulu11.45.27-ca-jdk11.0.10-macosx_aarch64",
urls = [
"https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu11.45.27-ca-jdk11.0.10-macosx_aarch64.tar.gz",
"https://cdn.azul.com/zulu/bin/zulu11.45.27-ca-jdk11.0.10-macosx_aarch64.tar.gz",
],
)

# This must be kept in sync with src/test/shell/bazel/testdata/jdk_http_archives.
http_archive(
name = "openjdk11_windows_archive",
Expand Down Expand Up @@ -1084,6 +1154,21 @@ exports_files(["WORKSPACE"], visibility = ["//visibility:public"])
],
)

# This must be kept in sync with src/test/shell/bazel/testdata/jdk_http_archives.
http_archive(
name = "openjdk15_darwin_aarch64_archive",
build_file_content = """
java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])
exports_files(["WORKSPACE"], visibility = ["//visibility:public"])
""",
sha256 = "2613c3f15eef6b6ecd0fd102da92282b985e4573905dc902f1783d8059c1efc5",
strip_prefix = "zulu15.29.15-ca-jdk15.0.2-macosx_aarch64",
urls = [
"https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu15.29.15-ca-jdk15.0.2-macosx_aarch64.tar.gz",
"https://cdn.azul.com/zulu/bin/zulu15.29.15-ca-jdk15.0.2-macosx_aarch64.tar.gz",
],
)

# This must be kept in sync with src/test/shell/bazel/testdata/jdk_http_archives.
http_archive(
name = "openjdk15_windows_archive",
Expand Down
15 changes: 15 additions & 0 deletions src/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ md5_cmd = "set -e -o pipefail && %s $(SRCS) | %s | %s > $@"
"//src/main/java/net/starlark/java/eval:cpu_profiler",
# TODO(brandjon): ensure we haven't forgotten any package-zip items,
# otherwise bazel won't correctly reextract modified files.
":platforms_archive",
"//src/main/cpp:client",
"//src/main/tools:build-runfiles",
"//src/main/tools:process-wrapper",
Expand Down Expand Up @@ -178,6 +179,9 @@ filegroup(
"//src/conditions:darwin": [
"@openjdk_macos//file",
],
"//src/conditions:darwin_arm64": [
"@openjdk_macos_aarch64//file",
],
"//src/conditions:windows": [
"@openjdk_win//file",
],
Expand All @@ -197,6 +201,9 @@ filegroup(
"//src/conditions:darwin": [
"@openjdk_macos_minimal//file",
],
"//src/conditions:darwin_arm64": [
"@openjdk_macos_aarch64_minimal//file",
],
"//src/conditions:windows": [
"@openjdk_win_minimal//file",
],
Expand All @@ -216,6 +223,9 @@ filegroup(
"//src/conditions:darwin": [
"@openjdk_macos_vanilla//file",
],
"//src/conditions:darwin_arm64": [
"@openjdk_macos_aarch64_vanilla//file",
],
"//src/conditions:windows": [
"@openjdk_win_vanilla//file",
],
Expand Down Expand Up @@ -749,18 +759,21 @@ filegroup(
"@bazel_skylib//:WORKSPACE",
"@bazel_toolchains//:WORKSPACE",
"@com_google_protobuf//:WORKSPACE",
"@openjdk11_darwin_aarch64_archive//:WORKSPACE",
"@openjdk11_darwin_archive//:WORKSPACE",
"@openjdk11_linux_archive//:WORKSPACE",
"@openjdk11_windows_archive//:WORKSPACE",
"@openjdk14_darwin_archive//:WORKSPACE",
"@openjdk14_linux_archive//:WORKSPACE",
"@openjdk14_windows_archive//:WORKSPACE",
"@openjdk15_darwin_aarch64_archive//:WORKSPACE",
"@openjdk15_darwin_archive//:WORKSPACE",
"@openjdk15_linux_archive//:WORKSPACE",
"@openjdk15_windows_archive//:WORKSPACE",
"@openjdk_linux_aarch64_minimal//file",
"@openjdk_linux_minimal//file",
"@openjdk_macos_minimal//file",
"@openjdk_macos_aarch64_minimal//file",
"@openjdk_win_minimal//file",
"@remote_coverage_tools_for_testing//:WORKSPACE",
"@remote_java_tools_darwin_for_testing//:WORKSPACE",
Expand All @@ -773,12 +786,14 @@ filegroup(
"@remotejdk11_linux_for_testing//:WORKSPACE",
"@remotejdk11_linux_ppc64le_for_testing//:WORKSPACE",
"@remotejdk11_linux_s390x_for_testing//:WORKSPACE",
"@remotejdk11_macos_aarch64_for_testing//:WORKSPACE",
"@remotejdk11_macos_for_testing//:WORKSPACE",
"@remotejdk11_win_for_testing//:WORKSPACE",
"@remotejdk14_linux_for_testing//:WORKSPACE",
"@remotejdk14_macos_for_testing//:WORKSPACE",
"@remotejdk14_win_for_testing//:WORKSPACE",
"@remotejdk15_linux_for_testing//:WORKSPACE",
"@remotejdk15_macos_aarch64_for_testing//:WORKSPACE",
"@remotejdk15_macos_for_testing//:WORKSPACE",
"@remotejdk15_win_for_testing//:WORKSPACE",
"@rules_cc//:WORKSPACE",
Expand Down
21 changes: 20 additions & 1 deletion src/conditions/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@bazel_skylib//lib:selects.bzl", "selects")

filegroup(
name = "srcs",
srcs = glob(["**"]),
Expand Down Expand Up @@ -89,11 +91,28 @@ config_setting(
)

config_setting(
name = "darwin_arm64",
name = "darwin_arm64_constraint",
constraint_values = [
"@platforms//os:macos",
"@platforms//cpu:arm64",
],
)

config_setting(
name = "darwin_arm64_flag",
values = {"cpu": "darwin_arm64"},
)

# Workaround for an issue where the dummy cc toolchain isn't being picked up
# when cross-compile from darwin_x86_64 to darwin_arm64 cpu.
# TODO(https://github.com/bazelbuild/bazel/issues/12655): Remove the flag based
# select when the issue is resolved.
selects.config_setting_group(
name = "darwin_arm64",
match_any = [
":darwin_arm64_constraint",
":darwin_arm64_flag",
],
visibility = ["//visibility:public"],
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@ public String convert(String input) throws OptionsParsingException {
// linux-x86_64, darwin includes the CPU architecture, ...).
switch (OS.getCurrent()) {
case DARWIN:
return "darwin";
switch (CPU.getCurrent()) {
case X86_64:
return "darwin";
case AARCH64:
return "darwin_arm64";
default:
return "unknown";
}
case FREEBSD:
return "freebsd";
case OPENBSD:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,19 @@ maybe(
],
)

# This must be kept in sync with the top-level WORKSPACE file.
maybe(
http_archive,
name = "remotejdk11_macos_aarch64",
build_file = "@bazel_tools//tools/jdk:jdk.BUILD",
sha256 = "3dcc636e64ae58b922269c2dc9f20f6f967bee90e3f6847d643c4a566f1e8d8a",
strip_prefix = "zulu11.45.27-ca-jdk11.0.10-macosx_aarch64",
urls = [
"https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu11.45.27-ca-jdk11.0.10-macosx_aarch64.tar.gz",
"https://cdn.azul.com/zulu/bin/zulu11.45.27-ca-jdk11.0.10-macosx_aarch64.tar.gz",
],
)

# This must be kept in sync with the top-level WORKSPACE file.
maybe(
http_archive,
Expand Down Expand Up @@ -146,6 +159,19 @@ maybe(
],
)

# This must be kept in sync with the top-level WORKSPACE file.
maybe(
http_archive,
name = "remotejdk15_macos_aarch64",
build_file = "@bazel_tools//tools/jdk:jdk.BUILD",
strip_prefix = "zulu15.29.15-ca-jdk15.0.2-macosx_aarch64",
sha256 = "2613c3f15eef6b6ecd0fd102da92282b985e4573905dc902f1783d8059c1efc5",
urls = [
"https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu15.29.15-ca-jdk15.0.2-macosx_aarch64.tar.gz",
"https://cdn.azul.com/zulu/bin/zulu15.29.15-ca-jdk15.0.2-macosx_aarch64.tar.gz",
],
)

# This must be kept in sync with the top-level WORKSPACE file.
maybe(
http_archive,
Expand Down
2 changes: 2 additions & 0 deletions src/test/py/bazel/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,14 @@ class TestBase(unittest.TestCase):
'remotejdk11_linux_ppc64le_for_testing',
'remotejdk11_linux_s390x_for_testing',
'remotejdk11_macos_for_testing',
'remotejdk11_macos_aarch64_for_testing',
'remotejdk11_win_for_testing',
'remotejdk14_linux_for_testing',
'remotejdk14_macos_for_testing',
'remotejdk14_win_for_testing',
'remotejdk15_linux_for_testing',
'remotejdk15_macos_for_testing',
'remotejdk15_macos_aarch64_for_testing',
'remotejdk15_win_for_testing',
'remote_java_tools_darwin_for_testing',
'remote_java_tools_linux_for_testing',
Expand Down
Loading

0 comments on commit 270f00d

Please sign in to comment.