Skip to content

Commit e46edaf

Browse files
committed
Try to fix zig build.
1 parent 4fd2910 commit e46edaf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

build.zig

+3-2
Original file line numberDiff line numberDiff line change
@@ -127,17 +127,18 @@ pub fn build(b: *std.build.Builder) !void {
127127
const llama = make.obj("llama", "llama.cpp");
128128
const common = make.obj("common", "common/common.cpp");
129129
const console = make.obj("console", "common/console.cpp");
130+
const sampling = make.obj("sampling", "common/sampling.cpp");
130131
const grammar_parser = make.obj("grammar-parser", "common/grammar-parser.cpp");
131132
const train = make.obj("train", "common/train.cpp");
132133

133-
_ = make.exe("main", "examples/main/main.cpp", &.{ ggml, ggml_alloc, llama, common, console, grammar_parser });
134+
_ = make.exe("main", "examples/main/main.cpp", &.{ ggml, ggml_alloc, llama, common, sampling, console, grammar_parser });
134135
_ = make.exe("quantize", "examples/quantize/quantize.cpp", &.{ ggml, ggml_alloc, llama, common });
135136
_ = make.exe("perplexity", "examples/perplexity/perplexity.cpp", &.{ ggml, ggml_alloc, llama, common });
136137
_ = make.exe("embedding", "examples/embedding/embedding.cpp", &.{ ggml, ggml_alloc, llama, common });
137138
_ = make.exe("finetune", "examples/finetune/finetune.cpp", &.{ ggml, ggml_alloc, llama, common, train });
138139
_ = make.exe("train-text-from-scratch", "examples/train-text-from-scratch/train-text-from-scratch.cpp", &.{ ggml, ggml_alloc, llama, common, train });
139140

140-
const server = make.exe("server", "examples/server/server.cpp", &.{ ggml, ggml_alloc, llama, common, grammar_parser });
141+
const server = make.exe("server", "examples/server/server.cpp", &.{ ggml, ggml_alloc, llama, common, sampling, grammar_parser });
141142
if (server.target.isWindows()) {
142143
server.linkSystemLibrary("ws2_32");
143144
}

0 commit comments

Comments
 (0)