summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/build.rs b/build.rs
index acae6d67..5d2b9df6 100644
--- a/build.rs
+++ b/build.rs
@@ -42,6 +42,13 @@ mod testgen {
println!("cargo:rerun-if-changed=tests/headers");
+ // On behalf of clang_sys, rebuild ourselves if important configuration
+ // variables change, to ensure that bindings get rebuilt if the
+ // underlying libclang changes.
+ println!("cargo:rerun-if-env-changed=LLVM_CONFIG_PATH");
+ println!("cargo:rerun-if-env-changed=LIBCLANG_PATH");
+ println!("cargo:rerun-if-env-changed=LIBCLANG_STATIC_PATH");
+
for entry in entries {
match entry.path().extension().and_then(OsStr::to_str) {
Some("h") | Some("hpp") => {