Skip to content

Commit 52def09

Browse files
committed
Try to fix zig build.
1 parent fad923a commit 52def09

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
@@ -128,17 +128,18 @@ pub fn build(b: *std.build.Builder) !void {
128128
const llama = make.obj("llama", "llama.cpp");
129129
const common = make.obj("common", "common/common.cpp");
130130
const console = make.obj("console", "common/console.cpp");
131+
const sampling = make.obj("sampling", "common/sampling.cpp");
131132
const grammar_parser = make.obj("grammar-parser", "common/grammar-parser.cpp");
132133
const train = make.obj("train", "common/train.cpp");
133134

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

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

0 commit comments

Comments
 (0)