Skip to content

Commit

Permalink
Fix llama.cpp build dirtying src and breaking packaging
Browse files Browse the repository at this point in the history
Move the build-info.cpp to the output target after building to avoid
polluting during packaging and causing verification to fail.
  • Loading branch information
vlovich committed Feb 10, 2025
1 parent c2dc99b commit f600bf8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions llama-cpp-sys-2/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,11 @@ fn main() {
.always_configure(false);

let build_dir = config.build();
std::fs::rename(
llama_src.join("common/build-info.cpp"),
build_dir.join("build-info.cpp"),
)
.unwrap();

// Search paths
println!("cargo:rustc-link-search={}", out_dir.join("lib").display());
Expand Down

0 comments on commit f600bf8

Please sign in to comment.