Rollup merge of #62778 - jsgf:notify-dep-info, r=petrochenkov

Emit artifact notifications for dependency files

Emit `dep-info` artifact notifications for `.d` files.
This commit is contained in:
Mark Rousskov 2019-07-18 11:29:58 -04:00 committed by GitHub
commit 396903b781
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -688,12 +688,20 @@ fn write_out_deps(sess: &Session, outputs: &OutputFilenames, out_filenames: &[Pa
Ok(())
})();
if let Err(e) = result {
sess.fatal(&format!(
"error writing dependencies to `{}`: {}",
deps_filename.display(),
e
));
match result {
Ok(_) => {
if sess.opts.debugging_opts.emit_artifact_notifications {
sess.parse_sess.span_diagnostic
.emit_artifact_notification(&deps_filename, "dep-info");
}
},
Err(e) => {
sess.fatal(&format!(
"error writing dependencies to `{}`: {}",
deps_filename.display(),
e
))
}
}
}