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

build(bindings/java): Allow building on linux-aarch_64 #3527

Merged
merged 2 commits into from
Nov 8, 2023
Merged
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
6 changes: 5 additions & 1 deletion bindings/java/tools/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ def classifier_to_target(classifier: str) -> str:
return 'x86_64-unknown-linux-gnu'
if classifier == 'windows-x86_64':
return 'x86_64-pc-windows-msvc'
if classifier == 'linux-aarch_64':
return 'aarch64-unknown-linux-gnu'
raise Exception(f'Unsupported classifier: {classifier}')


Expand All @@ -44,6 +46,8 @@ def get_cargo_artifact_name(classifier: str) -> str:
return 'libopendal_java.so'
if classifier == 'windows-x86_64':
return 'opendal_java.dll'
if classifier == 'linux-aarch_64':
return 'libopendal_java.so'
raise Exception(f'Unsupported classifier: {classifier}')


Expand Down Expand Up @@ -74,7 +78,7 @@ def get_cargo_artifact_name(classifier: str) -> str:

output = basedir / 'target' / 'bindings'
Path(output).mkdir(exist_ok=True, parents=True)
cmd += ['--target-dir', output]
cmd += ['--target-dir', str(output)]

print('$ ' + subprocess.list2cmdline(cmd))
subprocess.run(cmd, cwd=basedir, check=True)
Expand Down