Skip to content

Commit

Permalink
build(bindings/java): Allow building on linux-aarch_64 (#3527)
Browse files Browse the repository at this point in the history
* chore: Improved Java's build.py compatibility across interpreter versions

* Added 'linux-aarch_64' support in build.py
  • Loading branch information
amunra authored Nov 8, 2023
1 parent 3a5c47b commit 9546db7
Showing 1 changed file with 5 additions and 1 deletion.
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

0 comments on commit 9546db7

Please sign in to comment.