Skip to content

Commit 2590bb6

Browse files
committed
Rebuild if llama.cpp build environment changes
If the user requests different properties for how llama.cpp is built, trigger a rebuild.
1 parent 8fc28b3 commit 2590bb6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llama-cpp-sys-2/build.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ fn main() {
166166
.map(|v| v == "1")
167167
.unwrap_or(false);
168168

169+
println!("cargo:rerun-if-env-changed=LLAMA_LIB_PROFILE");
170+
println!("cargo:rerun-if-env-changed=LLAMA_BUILD_SHARED_LIBS");
171+
println!("cargo:rerun-if-env-changed=LLAMA_STATIC_CRT");
172+
169173
debug_log!("TARGET: {}", target);
170174
debug_log!("CARGO_MANIFEST_DIR: {}", manifest_dir);
171175
debug_log!("TARGET_DIR: {}", target_dir.display());

0 commit comments

Comments
 (0)