llm: statically link pthread and stdc++ dependencies in windows build

This commit is contained in:
jmorganca
2024-07-06 12:54:02 -04:00
parent 9ae146993e
commit f1a379aa56
2 changed files with 2 additions and 2 deletions

View File

@@ -1,7 +1,8 @@
package llm
// #cgo CFLAGS: -Illama.cpp -Illama.cpp/include -Illama.cpp/ggml/include
// #cgo LDFLAGS: -lllama -lggml -lstdc++
// #cgo LDFLAGS: -lllama -lggml -lstdc++ -lpthread
// #cgo windows LDFLAGS: -static-libstdc++ -static-libgcc -static
// #cgo darwin,arm64 LDFLAGS: -L${SRCDIR}/build/darwin/arm64_static -L${SRCDIR}/build/darwin/arm64_static/src -L${SRCDIR}/build/darwin/arm64_static/ggml/src -framework Accelerate -framework Metal
// #cgo darwin,amd64 LDFLAGS: -L${SRCDIR}/build/darwin/x86_64_static -L${SRCDIR}/build/darwin/x86_64_static/src -L${SRCDIR}/build/darwin/x86_64_static/ggml/src
// #cgo windows,amd64 LDFLAGS: -L${SRCDIR}/build/windows/amd64_static -L${SRCDIR}/build/windows/amd64_static/src -L${SRCDIR}/build/windows/amd64_static/ggml/src