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

Use correct ndll loader path on mac arm64 #1753

Merged
merged 4 commits into from
May 31, 2024
Merged
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
Binary file modified run.n
Binary file not shown.
5 changes: 5 additions & 0 deletions src/lime/system/CFFI.hx
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@ class CFFI
{
result = __tryLoad(haxelib + "/ndll/" + __sysName() + "64/" + library, library, method, args);
}

if (result == null)
{
result = __tryLoad(haxelib + "/ndll/" + __sysName() + "Arm64/" + library, library, method, args);
}
}
}

Expand Down
Binary file modified svg.n
Binary file not shown.
17 changes: 8 additions & 9 deletions tools/CommandLineTools.hx
Original file line number Diff line number Diff line change
Expand Up @@ -485,15 +485,14 @@ class CommandLineTools
}

case MAC:
// if (System.hostArchitecture == X64) {

untyped $loader.path = $array(path + "Mac64/", $loader.path);
player-03 marked this conversation as resolved.
Show resolved Hide resolved

// } else {

// untyped $loader.path = $array (path + "Mac/", $loader.path);

// }
if (System.hostArchitecture == X64)
{
untyped $loader.path = $array(path + "Mac64/", $loader.path);
}
else if (System.hostArchitecture == ARM64)
{
untyped $loader.path = $array(path + "MacArm64/", $loader.path);
}

case LINUX:
var arguments = Sys.args();
Expand Down
4 changes: 2 additions & 2 deletions tools/RunScript.hx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class RunScript

if (!rebuildBinaries) return;

var platforms = ["Windows", "Mac", "Mac64", "Linux", "Linux64"];
var platforms = ["Windows", "Mac", "Mac64", "MacArm64", "Linux", "Linux64"];

for (platform in platforms)
{
Expand Down Expand Up @@ -64,7 +64,7 @@ class RunScript
System.runCommand(limeDirectory, "neko", args.concat(["windows", toolsDirectory]));
}

case "Mac", "Mac64":
case "Mac", "Mac64", "MacArm64":
if (System.hostPlatform == MAC)
{
System.runCommand(limeDirectory, "neko", args.concat(["mac", toolsDirectory]));
Expand Down
10 changes: 8 additions & 2 deletions tools/SVGExport.hx
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,14 @@ class SVGExport
// }

case MAC:
untyped $loader.path = $array(path + "Mac/", $loader.path);
untyped $loader.path = $array(path + "Mac64/", $loader.path);
tobil4sk marked this conversation as resolved.
Show resolved Hide resolved
if (System.hostArchitecture == X64)
{
untyped $loader.path = $array(path + "Mac64/", $loader.path);
}
else if (System.hostArchitecture == ARM64)
{
untyped $loader.path = $array(path + "MacArm64/", $loader.path);
}

case LINUX:
var arguments = Sys.args();
Expand Down
2 changes: 1 addition & 1 deletion tools/platforms/MacPlatform.hx
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,6 @@ class MacPlatform extends PlatformTarget

private inline function get_dirSuffix():String
{
return targetArchitecture == X64 ? "64" : "";
return targetArchitecture == X64 ? "64" : targetArchitecture == ARM64 ? "Arm64" : "";
tobil4sk marked this conversation as resolved.
Show resolved Hide resolved
}
}
Loading