mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +00:00
fix(build): check that LuaJIT has required modules for compilation (#16714)
Apparently some installations of LuaJIT do not have the "jit.bcsave" module which is required for pre-compilation. Check that this module exists before using LuaJIT as luac and if it doesn't, skip compiling bytecode.
This commit is contained in:
@@ -553,8 +553,11 @@ if(NOT WIN32)
|
|||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
elseif(LUA_PRG MATCHES "luajit")
|
elseif(LUA_PRG MATCHES "luajit")
|
||||||
|
check_lua_module(${LUA_PRG} "jit.bcsave" LUAJIT_HAS_JIT_BCSAVE)
|
||||||
|
if(LUAJIT_HAS_JIT_BCSAVE)
|
||||||
set(LUAC_PRG "${LUA_PRG} -b -s %s -" CACHE STRING "Format for compiling to Lua bytecode")
|
set(LUAC_PRG "${LUA_PRG} -b -s %s -" CACHE STRING "Format for compiling to Lua bytecode")
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(LUAC_PRG)
|
if(LUAC_PRG)
|
||||||
|
Reference in New Issue
Block a user