This is an automated email from the ASF dual-hosted git repository.

masahi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new 3a9f40c  Fix an infinite recompilation loop in tvm-sys. (#9450)
3a9f40c is described below

commit 3a9f40c79bf9dff8bc9b5adb4fc70855352beb2b
Author: Nick Sarten <[email protected]>
AuthorDate: Sun Nov 7 09:42:20 2021 +1300

    Fix an infinite recompilation loop in tvm-sys. (#9450)
    
    Including the CMake `build` directory in `reun-if-changed` was leading
    to `tvm-sys` recompiling on every invocation of `cargo build` (along
    with every crate which depended on it).
---
 rust/tvm-sys/build.rs | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/rust/tvm-sys/build.rs b/rust/tvm-sys/build.rs
index 7793f9f..80c7efb 100644
--- a/rust/tvm-sys/build.rs
+++ b/rust/tvm-sys/build.rs
@@ -224,10 +224,9 @@ fn main() -> Result<()> {
     }?;
 
     // If the TVM_HOME environment variable changed, the LLVM_CONFIG_PATH 
environment variable
-    // changed, the build directory or headers have changed we need to rebuild 
the Rust bindings.
+    // changed or the source headers have changed we need to rebuild the Rust 
bindings.
     println!("cargo:rerun-if-env-changed=TVM_HOME");
     println!("cargo:rerun-if-env-changed=LLVM_CONFIG_PATH");
-    println!("cargo:rerun-if-changed={}", build_path.display());
     println!("cargo:rerun-if-changed={}/include", source_path.display());
 
     let library_name = if cfg!(feature = "runtime-only") {

Reply via email to