From 7061cd334d9c9472aa0ac523564f004395ad1991 Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Tue, 3 Dec 2024 03:35:32 +0900 Subject: [PATCH] fix(#14): build script does not rebuild when the LLVM prefix has been corrected from an invalid path to a valid one --- llvm-plugin/build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm-plugin/build.rs b/llvm-plugin/build.rs index aa3796d..b9d1689 100644 --- a/llvm-plugin/build.rs +++ b/llvm-plugin/build.rs @@ -4,6 +4,7 @@ fn main() { let (major, minor) = *llvm_sys::LLVM_VERSION_FROM_FEATURES; println!("cargo:rustc-env=LLVM_VERSION_MAJOR={}{}", major, minor); + println!("cargo:rerun-if-env-changed={}", &*llvm_sys::ENV_LLVM_PREFIX); if llvm_sys::LLVM_CONFIG_PATH.is_none() { println!("cargo:rustc-cfg=LLVM_NOT_FOUND"); return; @@ -54,7 +55,6 @@ fn main() { } println!("cargo:rerun-if-changed=cpp"); - println!("cargo:rerun-if-env-changed={}", &*llvm_sys::ENV_LLVM_PREFIX); } // Most code from this module was taken from the `llvm-sys` crate.