Skip to content

Commit 725ff79

Browse files
committed
fix: libC linking during Lua step
1 parent 0836cfa commit 725ff79

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

build.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,8 @@ pub fn linkAndPackage(b: *Builder, step: *LibExeObjStep, options: Options) std.b
6060

6161
// TODO: expose the link and package steps separately for advanced use cases?
6262
fn link(b: *Builder, step: *LibExeObjStep, options: Options) void {
63-
const lib = buildLua(b, step, options);
64-
step.linkLibrary(lib);
65-
step.linkLibC();
63+
const lua = buildLua(b, step, options);
64+
step.linkLibrary(lua);
6665
}
6766

6867
// TODO: how to test all versions? May need a make/help script to test all
@@ -81,6 +80,7 @@ fn buildLua(b: *Builder, step: *LibExeObjStep, options: Options) *LibExeObjStep
8180
};
8281
lua.setBuildMode(step.build_mode);
8382
lua.setTarget(step.target);
83+
lua.linkLibC();
8484

8585
const apicheck = step.build_mode == .Debug and options.use_apicheck;
8686

0 commit comments

Comments
 (0)