Skip to content

Commit b598b76

Browse files
committedOct 8, 2023
Try to fix zig build.
1 parent d9b1f3d commit b598b76

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
@@ -110,15 +110,16 @@ pub fn build(b: *std.build.Builder) !void {
110110
const llama = make.obj("llama", "llama.cpp");
111111
const common = make.obj("common", "common/common.cpp");
112112
const console = make.obj("common", "common/console.cpp");
113+
const sampling = make.obj("common", "common/sampling.cpp");
113114
const grammar_parser = make.obj("grammar-parser", "common/grammar-parser.cpp");
114115

115-
_ = make.exe("main", "examples/main/main.cpp", &.{ ggml, ggml_alloc, llama, common, console, grammar_parser });
116+
_ = make.exe("main", "examples/main/main.cpp", &.{ ggml, ggml_alloc, llama, common, sampling, console, grammar_parser });
116117
_ = make.exe("quantize", "examples/quantize/quantize.cpp", &.{ ggml, ggml_alloc, llama, common });
117118
_ = make.exe("perplexity", "examples/perplexity/perplexity.cpp", &.{ ggml, ggml_alloc, llama, common });
118119
_ = make.exe("embedding", "examples/embedding/embedding.cpp", &.{ ggml, ggml_alloc, llama, common });
119120
_ = make.exe("train-text-from-scratch", "examples/train-text-from-scratch/train-text-from-scratch.cpp", &.{ ggml, ggml_alloc, llama, common });
120121

121-
const server = make.exe("server", "examples/server/server.cpp", &.{ ggml, ggml_alloc, llama, common, grammar_parser });
122+
const server = make.exe("server", "examples/server/server.cpp", &.{ ggml, ggml_alloc, llama, common, sampling, grammar_parser });
122123
if (server.target.isWindows()) {
123124
server.linkSystemLibrary("ws2_32");
124125
}

0 commit comments

Comments
 (0)
Please sign in to comment.