mirror of
https://github.com/neovim/neovim.git
synced 2025-09-26 04:58:33 +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:
@@ -8,6 +8,7 @@ pub fn build_nlua0(
|
||||
use_luajit: bool,
|
||||
ziglua: *std.Build.Dependency,
|
||||
lpeg: *std.Build.Dependency,
|
||||
libluv: *std.Build.Step.Compile,
|
||||
) *std.Build.Step.Compile {
|
||||
const options = b.addOptions();
|
||||
options.addOption(bool, "use_luajit", use_luajit);
|
||||
@@ -39,6 +40,7 @@ pub fn build_nlua0(
|
||||
mod.addImport("embedded_data", embedded_data);
|
||||
// addImport already links by itself. but we need headers as well..
|
||||
mod.linkLibrary(ziglua.artifact("lua"));
|
||||
mod.linkLibrary(libluv);
|
||||
|
||||
mod.addOptions("options", options);
|
||||
|
||||
|
Reference in New Issue
Block a user