Skip to content

Commit cf1c455

Browse files
committed
Fix linux_arm64 binary resolution
1 parent 2717f48 commit cf1c455

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/main/java/org/bridj/Platform.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,14 @@ static void addTemporaryExtractedLibraryFileToDeleteOnExit(File file) throws IOE
206206
arch = System.getProperty("os.arch");
207207
{
208208
String dataModel = System.getProperty("sun.arch.data.model", System.getProperty("com.ibm.vm.bitmode"));
209+
// TODO(ochafik): Look at sun.cpu.endian=little for ppc64le
210+
// System.err.println("# os.arch = " + arch);
211+
// System.err.println("# sun.arch.data.model = " + dataModel);
212+
// try {
213+
// System.getProperties().store(System.out, "");
214+
// } catch (Exception ex) {
215+
// throw new RuntimeException(ex);
216+
// }
209217
if ("32".equals(dataModel)) {
210218
is64Bits = false;
211219
} else if ("64".equals(dataModel)) {
@@ -526,7 +534,7 @@ public static boolean isAndroid() {
526534

527535
public static boolean isArm() {
528536
String arch = getArch();
529-
return "arm".equals(arch) || "arm64".equals(arch);
537+
return "arm".equals(arch) || "arm64".equals(arch) || "aarch64".equals(arch);
530538
}
531539

532540
public static boolean isSparc() {

0 commit comments

Comments
 (0)