Skip to content

Commit

Permalink
Merge branch 'enable-jit' into 'master'
Browse files Browse the repository at this point in the history
Add `sol::lib::jit` to actually enable JIT

See merge request OpenMW/openmw!3639
  • Loading branch information
jvoisin committed Dec 8, 2023
2 parents 571a097 + 8161771 commit 7894e7a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/lua/luastate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ namespace LuaUtil
mSol.open_libraries(sol::lib::base, sol::lib::coroutine, sol::lib::math, sol::lib::bit32, sol::lib::string,
sol::lib::table, sol::lib::os, sol::lib::debug);

#ifndef NO_LUAJIT
mSol.open_libraries(sol::lib::jit);
#endif // NO_LUAJIT

mSol["math"]["randomseed"](static_cast<unsigned>(std::time(nullptr)));
mSol["math"]["randomseed"] = [] {};

Expand Down

0 comments on commit 7894e7a

Please sign in to comment.