Skip to content

Commit f7d53a9

Browse files
committed
Emit artifact notifications for dependency files
1 parent efb7457 commit f7d53a9

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

src/librustc_interface/passes.rs

+14-6
Original file line numberDiff line numberDiff line change
@@ -688,12 +688,20 @@ fn write_out_deps(sess: &Session, outputs: &OutputFilenames, out_filenames: &[Pa
688688
Ok(())
689689
})();
690690

691-
if let Err(e) = result {
692-
sess.fatal(&format!(
693-
"error writing dependencies to `{}`: {}",
694-
deps_filename.display(),
695-
e
696-
));
691+
match result {
692+
Ok(_) => {
693+
if sess.opts.debugging_opts.emit_artifact_notifications {
694+
sess.parse_sess.span_diagnostic
695+
.emit_artifact_notification(&deps_filename, "dep-info");
696+
}
697+
},
698+
Err(e) => {
699+
sess.fatal(&format!(
700+
"error writing dependencies to `{}`: {}",
701+
deps_filename.display(),
702+
e
703+
))
704+
}
697705
}
698706
}
699707

0 commit comments

Comments
 (0)