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

  • From: Cosmin Apreutesei <cosmin.apreutesei@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Thu, 13 Mar 2014 21:01:07 +0200

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?)

Other related posts: