Re: luajit binary linking dynamically to libluajit.so on linux and osx

  • From: Alex <initrd.gz@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Thu, 13 Mar 2014 15:26:57 -0400

Check the src/Makefile. If you set BUILDMODE=dynamic, it will link the
luajit executable dynamically.


On Thu, Mar 13, 2014 at 3:01 PM, Cosmin Apreutesei <
cosmin.apreutesei@xxxxxxxxx> wrote:

> Hi,
>
> I noticed that on Windows, luajit.exe is only a frontend to lua51.dll.
>
> On linux and osx, luajit is built statically. Can it be made to link
> dynamically to libluajit.so|.dylib so that the binary is smaller? If
> so, how? And, is there any downside to it?
>
> Another reason for this question: lanes docs say that, on osx at
> least, the lua binary must be built in this way (linked dynamically
> against libluajit.dylib like in windows). I'm not sure why and if this
> applies to luajit too.
>
> Also, I'm not sure if it's ok for Lua/C libraries to be linked against
> libluajit.dylib since that's not the running Lua runtime (even if it's
> ok, doesn't that mean that the luajit binary is loaded in memory
> twice, once from luajit and once from libluajit.dylib?)
>
>


-- 
Sincerely,
Alex Parrill

Other related posts: