fixed artifact ambiguity

This commit is contained in:
Jacob Stannix 2024-08-15 16:30:56 -06:00
parent ee2e87371c
commit 94c5e60869

View file

@ -9,7 +9,7 @@ const version = std.SemanticVersion{
.patch = 7, .patch = 7,
}; };
const lib_name = "lua"; const lib_name = "lua";
const exe_name = lib_name; const exe_name = lib_name ++ "_exe";
const compiler_name = "luac"; const compiler_name = "luac";
pub fn build(b: *Build) !void { pub fn build(b: *Build) !void {
@ -140,10 +140,6 @@ pub fn build(b: *Build) !void {
.flags = &cflags, .flags = &cflags,
}); });
// if (build_shared) {
// exe.addRPath(.{ .cwd_relative = b.getInstallPath(.{ .lib = {} }, "") });
// exec.addRPath(.{ .cwd_relative = b.getInstallPath(.{ .lib = {} }, "") });
// }
if (shared) |s| { if (shared) |s| {
exe.linkLibrary(s); exe.linkLibrary(s);
b.installArtifact(s); b.installArtifact(s);
@ -152,10 +148,10 @@ pub fn build(b: *Build) !void {
b.installArtifact(lib); b.installArtifact(lib);
} }
const install_bin = b.addInstallBinFile(exe.getEmittedBin(), "lua");
b.getInstallStep().dependOn(&install_bin.step);
exec.linkLibrary(lib); exec.linkLibrary(lib);
b.installArtifact(exe);
b.installArtifact(exec);
b.installDirectory(.{ b.installDirectory(.{
.source_dir = lua_src.path("doc"), .source_dir = lua_src.path("doc"),
.include_extensions = &.{".1"}, .include_extensions = &.{".1"},