]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/compiletest/src/main.rs
rustc: Load the `rustc_trans` crate at runtime
[rust.git] / src / tools / compiletest / src / main.rs
index 533aaf9cd27353bf9e0b78eab246f8df8728da72..b98a4248d81d68429318859d256b05c4ded72f82 100644 (file)
@@ -667,9 +667,16 @@ fn up_to_date(config: &Config, testpaths: &TestPaths, props: &EarlyProps) -> boo
     for pretty_printer_file in &pretty_printer_files {
         inputs.push(mtime(&rust_src_dir.join(pretty_printer_file)));
     }
-    for lib in config.run_lib_path.read_dir().unwrap() {
-        let lib = lib.unwrap();
-        inputs.push(mtime(&lib.path()));
+    let mut entries = config.run_lib_path.read_dir().unwrap()
+        .collect::<Vec<_>>();
+    while let Some(entry) = entries.pop() {
+        let entry = entry.unwrap();
+        let path = entry.path();
+        if entry.metadata().unwrap().is_file() {
+            inputs.push(mtime(&path));
+        } else {
+            entries.extend(path.read_dir().unwrap());
+        }
     }
     if let Some(ref rustdoc_path) = config.rustdoc_path {
         inputs.push(mtime(&rustdoc_path));