Browse Source

Fix autopatch of shared libraries on Darwin

Thanks to David.Gao / DavidAlphaFox for the original patch.
Loïc Hoguin 2 years ago
parent
commit
9d4f7c539c
1 changed files with 2 additions and 0 deletions
  1. 2 0
      core/deps.mk

+ 2 - 0
core/deps.mk

@@ -604,6 +604,8 @@ define dep_autopatch_rebar.erl
 					"\t$$\(CC) -o $$\@ $$\? $$\(LDFLAGS) $$\(ERL_LDFLAGS) $$\(DRV_LDFLAGS) $$\(LDLIBS) $$\(EXE_LDFLAGS)",
 					case {filename:extension(Output), $(PLATFORM)} of
 					    {[], _} -> "\n";
+					    {".so", darwin} -> "-shared\n";
+					    {".dylib", darwin} -> "-shared\n";
 					    {_, darwin} -> "\n";
 					    _ -> " -shared\n"
 					end])