Skip to content

Commit

Permalink
MacPlatform: fix error that says @rpath/libhl.dylib is not found wh…
Browse files Browse the repository at this point in the history
…en using HashLink nightly builds for HL/C

Added `@executable_path` to the rpath.
  • Loading branch information
joshtynjala committed Nov 20, 2024
1 parent 61ec7d0 commit 4812f6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/platforms/MacPlatform.hx
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ class MacPlatform extends PlatformTarget
// compiler command with the `arch -x86_64` command.
// if we ever support ARM or Universal binaries, this will
// need to be handled differently.
var command = ["arch", "-x86_64", compiler, "-O3", "-o", executablePath, "-std=c11", "-I", Path.combine(targetDirectory, "obj"), Path.combine(targetDirectory, "obj/ApplicationMain.c")];
var command = ["arch", "-x86_64", compiler, "-O3", "-o", executablePath, "-std=c11", "-Wl,-rpath,@executable_path", "-I", Path.combine(targetDirectory, "obj"), Path.combine(targetDirectory, "obj/ApplicationMain.c")];
for (file in System.readDirectory(executableDirectory))
{
switch Path.extension(file)
Expand Down

0 comments on commit 4812f6a

Please sign in to comment.