浏览代码

add rebuild logic to compiler-rt-cdylib

fixes #136
Jorge Aparicio 8 年之前
父节点
当前提交
c08b1692a6
共有 1 个文件被更改,包括 8 次插入1 次删除
  1. 8 1
      compiler-rt/compiler-rt-cdylib/build.rs

+ 8 - 1
compiler-rt/compiler-rt-cdylib/build.rs

@@ -62,9 +62,16 @@ fn main() {
         "powisf2.c",
     ]);
 
+    let builtins_dir = Path::new("compiler-rt/lib/builtins");
     for src in sources.files.iter() {
-        cfg.file(Path::new("compiler-rt/lib/builtins").join(src));
+        cfg.file(builtins_dir.join(src));
     }
 
     cfg.compile("libcompiler-rt.a");
+
+    println!("cargo:rerun-if-changed=build.rs");
+
+    for source in sources.files.iter() {
+        println!("cargo:rerun-if-changed={}", builtins_dir.join(source).display());
+    }
 }