From 81617719692dd410de135dd756d0c93502d65a59 Mon Sep 17 00:00:00 2001 From: Devin Alexander Torres Date: Thu, 7 Dec 2023 04:57:52 -0600 Subject: [PATCH] Add sol::lib::jit to actually enable JIT --- components/lua/luastate.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/lua/luastate.cpp b/components/lua/luastate.cpp index 95b56fb020..0a350a2d9f 100644 --- a/components/lua/luastate.cpp +++ b/components/lua/luastate.cpp @@ -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(std::time(nullptr))); mSol["math"]["randomseed"] = [] {};