Skip to content

Commit 73d7412

Browse files
committed
update build.zig and todos
1 parent b976750 commit 73d7412

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

TODOS.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
- [ ] Configure build.zig to save library file name using triple target and optimize mode
1+
- [x] Configure build.zig to save library file name using triple target and optimize mode
22
- [ ] Implement LlamaModel resource class
33
- [ ] Implement Llama node class

build.zig

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const extension_name = "godot-llama-cpp";
77
pub fn build(b: *std.Build) !void {
88
const target = b.standardTargetOptions(.{});
99
const optimize = b.standardOptimizeOption(.{});
10-
const zig_triple = try target.result.zigTriple(b.allocator);
10+
const zig_triple = try target.result.linuxTriple(b.allocator);
1111

1212
var objs = std.ArrayList(*std.Build.Step.Compile).init(b.allocator);
1313

@@ -205,7 +205,7 @@ pub fn build(b: *std.Build) !void {
205205
try objs.append(ggml_vulkan);
206206
}
207207

208-
const extension = b.addSharedLibrary(.{ .name = b.fmt("{s}-{s}", .{ extension_name, zig_triple }), .target = target, .optimize = optimize });
208+
const extension = b.addSharedLibrary(.{ .name = b.fmt("{s}-{s}-{s}", .{ extension_name, zig_triple, @tagName(optimize) }), .target = target, .optimize = optimize });
209209
const sources = try findFilesRecursive(b, "src", &cfiles_exts);
210210
extension.addCSourceFiles(.{ .files = sources, .flags = &.{ "-std=c++17", "-fno-exceptions" } });
211211
extension.addIncludePath(.{ .path = "src" });

0 commit comments

Comments
 (0)