mirror of
https://github.com/neovim/neovim.git
synced 2025-09-26 04:58:33 +00:00
fix(build): remove deprecated aliases in build.zig removed for zig 0.15
This makes the zig build compatible with the upcoming zig 0.15 release, while still supporting the current stable 0.14 release still used in CI.
This commit is contained in:
@@ -14,16 +14,20 @@ pub fn build_nlua0(
|
||||
|
||||
const nlua0_exe = b.addExecutable(.{
|
||||
.name = "nlua0",
|
||||
.root_source_file = b.path("src/nlua0.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
.root_module = b.createModule(.{
|
||||
.root_source_file = b.path("src/nlua0.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
}),
|
||||
});
|
||||
const nlua0_mod = nlua0_exe.root_module;
|
||||
|
||||
const exe_unit_tests = b.addTest(.{
|
||||
.root_source_file = b.path("src/nlua0.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
.root_module = b.createModule(.{
|
||||
.root_source_file = b.path("src/nlua0.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
}),
|
||||
});
|
||||
|
||||
const embedded_data = b.addModule("embedded_data", .{
|
||||
@@ -31,7 +35,7 @@ pub fn build_nlua0(
|
||||
});
|
||||
|
||||
for ([2]*std.Build.Module{ nlua0_mod, exe_unit_tests.root_module }) |mod| {
|
||||
mod.addImport("ziglua", ziglua.module("lua_wrapper"));
|
||||
mod.addImport("ziglua", ziglua.module("zlua"));
|
||||
mod.addImport("embedded_data", embedded_data);
|
||||
// addImport already links by itself. but we need headers as well..
|
||||
mod.linkLibrary(ziglua.artifact("lua"));
|
||||
@@ -112,10 +116,13 @@ pub fn build_libluv(
|
||||
) !*std.Build.Step.Compile {
|
||||
const upstream = b.dependency("luv", .{});
|
||||
const compat53 = b.dependency("lua_compat53", .{});
|
||||
const lib = b.addStaticLibrary(.{
|
||||
const lib = b.addLibrary(.{
|
||||
.name = "luv",
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
.linkage = .static,
|
||||
.root_module = b.createModule(.{
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
}),
|
||||
});
|
||||
|
||||
lib.linkLibrary(lua);
|
||||
|
Reference in New Issue
Block a user