Skip to content

Commit eff774d

Browse files
committed
Added passthrough metadata information to help downstream projects build native libraries using llama.cpp build artifacts
Added INCLUDE pointing to llama.cpp source folder for header lookup Added OUT_DIR pointing to build output directory for object file lookup
1 parent 047898c commit eff774d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llama-cpp-sys-2/build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,9 @@ fn main() {
199199
bindings
200200
.write_to_file(out_path.join("bindings.rs"))
201201
.expect("failed to write bindings to file");
202+
let llama_cpp_dir = PathBuf::from("llama.cpp").canonicalize().unwrap();
203+
println!("cargo:INCLUDE={}", llama_cpp_dir.to_str().unwrap());
204+
println!("cargo:OUT_DIR={}", out_path.to_str().unwrap());
202205
}
203206

204207
// courtesy of https://github.com/rustformers/llm

0 commit comments

Comments
 (0)