Skip to content

Commit

Permalink
Same for luajit.zig
Browse files Browse the repository at this point in the history
  • Loading branch information
darltrash authored Nov 9, 2024
1 parent e472990 commit 9d0e025
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions build/luajit.zig
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,19 @@ const Step = std.Build.Step;

pub fn configure(b: *Build, target: Build.ResolvedTarget, optimize: std.builtin.OptimizeMode, upstream: *Build.Dependency, shared: bool) *Step.Compile {
// TODO: extract this to the main build function because it is shared between all specialized build functions
const lib_opts = .{
.name = "lua",
.target = target,
.optimize = optimize,
};

const lib: *Step.Compile = if (shared)
b.addSharedLibrary(lib_opts)
b.addSharedLibrary(.{
.name = "lua",
.target = target,
.optimize = optimize,
})
else
b.addStaticLibrary(lib_opts);
b.addStaticLibrary(.{
.name = "lua",
.target = target,
.optimize = optimize,
});

// Compile minilua interpreter used at build time to generate files
const minilua = b.addExecutable(.{
Expand Down

0 comments on commit 9d0e025

Please sign in to comment.