Closed kallisti5 closed 10 years ago
Our luajit patch is here: http://bb.haikuports.org/haikuports/src/7bfe0c3ccc878c816c435d1d5da30652d7369d24/games-engines/solarus/patches/solarus-luajit-1.1.1.patch Could likely be cleaned up a bit though.
Hi,
Thanks for your help :)
I already tried to compile with luajit and it works great. I made a branch for this: https://github.com/christopho/solarus/tree/luajit The diff is similar to yours.
Is luajit as portable as vanilla Lua? If no, what we should do in the cmake module is a fallback to vanilla Lua.
And can you tell me more about your crash? Do you have a callstack?
By the way, there is already an issue about Lua 5.2: https://github.com/christopho/solarus/issues/203 But I'm not sure I want to move to Lua 5.2 yet. Plus, LuaJIT is only compatible with Lua 5.1 if I understand correctly.
You can even use the LuaJit-NOTFOUND cmake variable to use Lua51 if LuaJit is not found, and just use the option or a command line to force one of them. Cmake will tell us which one is used at the configuration part anyway :)
I've thought about that. Finally, if LuaJit is wanted (the default) but not here, I really want an error, I don't want a normal Lua fallback. The user can still use normal Lua if he wants, by setting the cmake option SOLARUS_USE_LUAJIT to OFF.
Yep I noticed that, I thought that might be slightly heavy, and just display a warning could be enough :)
I've actually compiled solarus with luajit and it seems to run. solarus always crashes on my platform though so i'm unabel to test fully.