Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hack/arm64 #2

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions graalvm/repository_rules/remote_graalvm_repository/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ def _download_and_install_graalvm_native_image_installable_jar(repository_ctx):
JAR_PATH = "native_image_installable.jar"
result = repository_ctx.execute(["uname", "-m"])
cpu = result.stdout.strip()
if cpu == "arm64":
cpu = "aarch64"

repository_ctx.download(
output = JAR_PATH,
url = repository_ctx.attr.native_image_installable_jar_url[cpu],
Expand Down
5 changes: 5 additions & 0 deletions java/repository_rules/remote_openjdk_repository/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ def make_exec_compatible_with_str(repository_ctx):

result = repository_ctx.execute(["uname", "-m"])
cpu = result.stdout.strip()
if cpu == "arm64":
cpu = "aarch64"

cpu_constraints_map = {
"x86_64": "@platforms//cpu:x86_64",
"aarch64": "@platforms//cpu:aarch64",
Expand Down Expand Up @@ -56,6 +59,8 @@ def _guess_jvm_shared_library_file(repository_ctx):
def download_openjdk_dist_archive(repository_ctx):
result = repository_ctx.execute(["uname", "-m"])
cpu = result.stdout.strip()
if cpu == "arm64":
cpu = "aarch64"
repository_ctx.download_and_extract(
output = "jdk",
url = repository_ctx.attr.url[cpu],
Expand Down