lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Antonio Vieiro wrote:
> Is it possible to know if I'm compiling with LuaJIT at compile time?
> (this is, is there any #define out there specifically for detecting
> LuaJIT?).

Any C module you build against the Lua headers runs under LuaJIT
or vice versa (and the headers are almost the same). Even if you
build it with one set of headers, you can still load the same
binary module into the other VM.

So static detection at compile time (e.g. by some artifact in the
headers) simply doesn't do what you think it might do.

--Mike