Skip to content

Commit fbf6887

Browse files
committed
bump llamacpp, remove weird build-info.cpp copy
1 parent b2aa713 commit fbf6887

File tree

2 files changed

+0
-24
lines changed

2 files changed

+0
-24
lines changed

llama-cpp-sys-2/Cargo.toml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,6 @@ include = [
2424

2525
"/llama.cpp/convert_hf_to_gguf.py", # Yes, it's required
2626

27-
# Erroneously the llama.cpp code currently generates the build-info.cpp
28-
# into the source directory of the build instead of into the target directory
29-
# as it should. Will try submitting something upstream to clean this up as
30-
# well but for now explictly exclude this from the build. Previously this was
31-
# implicitly excluded because the llama.cpp code was copied wholesale into the
32-
# target directory for building which is why this problem wasn't visible before
33-
# (i.e. we'd package the llama.cpp source from the submodule & thus this build-info.cpp
34-
# generated file would still be ignored because it would only exist in the separate
35-
# copy within the target directory. An alternative, if we do want to capture build-info.cpp
36-
# within the package would be to change the CI task to add `--allow-dirty` to the package
37-
# command.
38-
"!/llama.cpp/common/build-info.cpp",
3927
"/llama.cpp/common/build-info.cpp.in",
4028

4129
"/llama.cpp/ggml/src/ggml-cuda.cu",

llama-cpp-sys-2/build.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -388,18 +388,6 @@ fn main() {
388388
.always_configure(false);
389389

390390
let build_dir = config.build();
391-
let build_info_src = llama_src.join("common/build-info.cpp");
392-
let build_info_target = build_dir.join("build-info.cpp");
393-
std::fs::rename(&build_info_src,&build_info_target).unwrap_or_else(|move_e| {
394-
// Rename may fail if the target directory is on a different filesystem/disk from the source.
395-
// Fall back to copy + delete to achieve the same effect in this case.
396-
std::fs::copy(&build_info_src, &build_info_target).unwrap_or_else(|copy_e| {
397-
panic!("Failed to rename {build_info_src:?} to {build_info_target:?}. Move failed with {move_e:?} and copy failed with {copy_e:?}");
398-
});
399-
std::fs::remove_file(&build_info_src).unwrap_or_else(|e| {
400-
panic!("Failed to delete {build_info_src:?} after copying to {build_info_target:?}: {e:?} (move failed because {move_e:?})");
401-
});
402-
});
403391

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

0 commit comments

Comments
 (0)