mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 06:58:35 +00:00
build: make build.zig generate helptags without running "nvim" binary
This is matters for cross-compiling where we might not be able to run the "nvim" binary on the host. Instead reimplement the helptags extractor as a small lua script, which we can run on the host using the nlua0 helper already used for other generator scripts.
This commit is contained in:
@@ -20,6 +20,7 @@ const Lua = ziglua.Lua;
|
||||
extern "c" fn luaopen_mpack(ptr: *anyopaque) c_int;
|
||||
extern "c" fn luaopen_lpeg(ptr: *anyopaque) c_int;
|
||||
extern "c" fn luaopen_bit(ptr: *anyopaque) c_int;
|
||||
extern "c" fn luaopen_luv(ptr: *anyopaque) c_int;
|
||||
|
||||
fn init() !*Lua {
|
||||
// Initialize the Lua vm
|
||||
@@ -56,6 +57,10 @@ fn init() !*Lua {
|
||||
if (retval2 != 1) return error.LoadError;
|
||||
lua.setField(-3, "lpeg");
|
||||
|
||||
const retval3 = luaopen_luv(lua);
|
||||
if (retval3 != 1) return error.LoadError;
|
||||
lua.setField(-3, "uv");
|
||||
|
||||
lua.pop(2);
|
||||
|
||||
if (!options.use_luajit) {
|
||||
|
Reference in New Issue
Block a user