Skip to content

Commit 9319252

Browse files
committed
rustc: Don't emit dep-info for imported files
Closes #23089
1 parent 68740b4 commit 9319252

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/librustc_driver/driver.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,9 @@ fn write_out_deps(sess: &Session,
797797
// Build a list of files used to compile the output and
798798
// write Makefile-compatible dependency rules
799799
let files: Vec<String> = sess.codemap().files.borrow()
800-
.iter().filter(|fmap| fmap.is_real_file())
800+
.iter()
801+
.filter(|fmap| fmap.is_real_file())
802+
.filter(|fmap| !fmap.is_imported())
801803
.map(|fmap| escape_dep_filename(&fmap.name))
802804
.collect();
803805
let mut file = try!(fs::File::create(&deps_filename));

0 commit comments

Comments
 (0)