fix llama.cpp build
This commit is contained in:
parent
9164981d72
commit
0240165388
2 changed files with 4 additions and 4 deletions
|
@ -24,5 +24,5 @@ target_include_directories(binding PRIVATE ${llama_cpp_SOURCE_DIR}/examples)
|
||||||
target_link_libraries(binding llama ggml_static)
|
target_link_libraries(binding llama ggml_static)
|
||||||
|
|
||||||
configure_file(${llama_cpp_SOURCE_DIR}/ggml-metal.metal ${CMAKE_CURRENT_BINARY_DIR}/ggml-metal.metal COPYONLY)
|
configure_file(${llama_cpp_SOURCE_DIR}/ggml-metal.metal ${CMAKE_CURRENT_BINARY_DIR}/ggml-metal.metal COPYONLY)
|
||||||
configure_file(${llama_cpp_BINARY_DIR}/libllama.a ${CMAKE_CURRENT_BINARY_DIR}/libllama.a COPYONLY)
|
add_custom_target(copy_libllama ALL COMMAND ${CMAKE_COMMAND} -E copy_if_different ${llama_cpp_BINARY_DIR}/libllama.a ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
configure_file(${llama_cpp_BINARY_DIR}/libggml_static.a ${CMAKE_CURRENT_BINARY_DIR}/libggml_static.a COPYONLY)
|
add_custom_target(copy_libggml_static ALL COMMAND ${CMAKE_COMMAND} -E copy_if_different ${llama_cpp_BINARY_DIR}/libggml_static.a ${CMAKE_CURRENT_BINARY_DIR})
|
|
@ -24,9 +24,9 @@
|
||||||
//go:generate cmake --build build
|
//go:generate cmake --build build
|
||||||
package llama
|
package llama
|
||||||
|
|
||||||
// #cgo LDFLAGS: -Lbuild -lbinding -lllama -lggml_static -lstdc++
|
// #cgo LDFLAGS: -Lbuild -lbinding -lllama -lm -lggml_static -lstdc++
|
||||||
|
// #cgo CXXFLAGS: -std=c++11
|
||||||
// #cgo darwin LDFLAGS: -framework Accelerate -framework Foundation -framework Metal -framework MetalKit -framework MetalPerformanceShaders
|
// #cgo darwin LDFLAGS: -framework Accelerate -framework Foundation -framework Metal -framework MetalKit -framework MetalPerformanceShaders
|
||||||
// #cgo darwin CXXFLAGS: -std=c++11
|
|
||||||
// #include "binding/binding.h"
|
// #include "binding/binding.h"
|
||||||
import "C"
|
import "C"
|
||||||
import (
|
import (
|
||||||
|
|
Loading…
Reference in a new issue