aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Anders <8965202+gpanders@users.noreply.github.com>2021-12-18 20:59:02 -0700
committerGitHub <noreply@github.com>2021-12-18 20:59:02 -0700
commitabdf3a8128b78fb98ee944bc5d3086c680d779ed (patch)
treee73c4ed7d772efc6021b775ffcc99704dc2f52d8
parentb42e0c40c8b8e906eccb14db0d0648a39e49c363 (diff)
downloadrneovim-abdf3a8128b78fb98ee944bc5d3086c680d779ed.tar.gz
rneovim-abdf3a8128b78fb98ee944bc5d3086c680d779ed.tar.bz2
rneovim-abdf3a8128b78fb98ee944bc5d3086c680d779ed.zip
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.
-rw-r--r--CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2c2587ec0b..2ca2385d8f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -553,7 +553,10 @@ if(NOT WIN32)
endif()
endforeach()
elseif(LUA_PRG MATCHES "luajit")
- set(LUAC_PRG "${LUA_PRG} -b -s %s -" CACHE STRING "Format for compiling to Lua bytecode")
+ 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")
+ endif()
endif()
endif()