solarus-games / solarus

This repository was moved to GitLab: https://gitlab.com/solarus-games/solarus
http://www.solarus-games.org
Other
712 stars 134 forks source link

[enhancement] [patch] move to luajit? #419

Closed kallisti5 closed 10 years ago

kallisti5 commented 10 years ago

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.

kallisti5 commented 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.

christopho commented 10 years ago

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?

christopho commented 10 years ago

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.

vlag commented 10 years ago

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

christopho commented 10 years ago

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.

vlag commented 10 years ago

Yep I noticed that, I thought that might be slightly heavy, and just display a warning could be enough :)