File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -287,6 +287,29 @@ fn produce_final_output_artifacts(
287287 }
288288 }
289289
290+ if sess. opts . json_artifact_notifications {
291+ if codegen_results. modules . len ( ) == 1 {
292+ codegen_results. modules [ 0 ] . for_each_output ( |_path, ty| {
293+ if sess. opts . output_types . contains_key ( & ty) {
294+ let descr = ty. shorthand ( ) ;
295+ // for single cgu file is renamed to drop cgu specific suffix
296+ // so we regenerate it the same way
297+ let path = crate_output. path ( ty) ;
298+ sess. dcx ( ) . emit_artifact_notification ( path. as_path ( ) , descr) ;
299+ }
300+ } ) ;
301+ } else {
302+ for module in & codegen_results. modules {
303+ module. for_each_output ( |path, ty| {
304+ if sess. opts . output_types . contains_key ( & ty) {
305+ let descr = ty. shorthand ( ) ;
306+ sess. dcx ( ) . emit_artifact_notification ( & path, descr) ;
307+ }
308+ } ) ;
309+ }
310+ }
311+ }
312+
290313 // We leave the following files around by default:
291314 // - #crate#.o
292315 // - #crate#.crate.metadata.o
You can’t perform that action at this time.
0 commit comments