Skip to content

Commit

Permalink
Merge pull request #37 from eed3si9n/wip/universal
Browse files Browse the repository at this point in the history
Fixes M1 support
  • Loading branch information
eed3si9n authored Jan 4, 2023
2 parents 645b7c6 + ea76485 commit 99720b8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/org/scalasbt/ipcsocket/NativeLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ static void load() throws UnsatisfiedLinkError {
if (arch.equals("amd64")) {
arch = "x86_64";
}
// https://github.com/sbt/sbt/issues/7117
// Currently only Linux has ARM-specific binary. The macOS binary is a universal binary,
// and Windows can potentially emulate x86.
if (isMac || isWindows) {
arch = "x86_64";
}
if (is64bit && (isMac || isLinux || isWindows)) {
final String extension = "." + (isMac ? "dylib" : isWindows ? "dll" : "so");
final String libName = (isWindows ? "" : "lib") + "sbtipcsocket" + extension;
Expand Down

0 comments on commit 99720b8

Please sign in to comment.