rules_java
rules_java copied to clipboard
java_tools should have prebuilt Linux AArch64 binaries
Currently, only four platforms have prebuilt java_tools binaries (singlejar, ijar, etc.): linux, windows, darwin_x86_64, darwin_arm64.
https://github.com/bazelbuild/rules_java/blob/3c34c81569e72f9984d7bdbcfd93d172ba685e4b/java/repositories.bzl#L27-L51
However, other parts of rules_java supports more platforms, like remotejdk21 which additionally supports Linux AArch64. It would be great if rules_java can distribute prebuilt Linux AArch64 binaries for java_tools, bringing it inline with JDK.
Is this a matter of enabling the build process to produce the binaries and release them or is the development work necessary to implement missing native support?
I'm guessing it's just a matter of enabling the build process. I haven't tried running it on AArch64, but I'd be surprised if there's any incompatibility.
Since GraalVM can't cross-compile native images, at least for full parity this would require having real Linux AArch64 machines in Bazel CI.
cc @meteorcloudy
As a workaround for now use https://github.com/bazelbuild/rules_java/blob/02df6937cda3f627a47d42391b09b7da0fe3b849/toolchains/default_java_toolchain.bzl#L124 with care
We do have two Linux Arm64 machines on Bazel CI, one in the normal Bazel unstrusted org, another in the trusted org for release builds. You can use them by ubuntu2004_arm64 platform name.