Skip to content

Commit 8e1527f

Browse files
committed
Pass artifact notifications though SharedEmitterMessage
1 parent 03994e4 commit 8e1527f

File tree

1 file changed

+11
-0
lines changed
  • compiler/rustc_codegen_ssa/src/back

1 file changed

+11
-0
lines changed

compiler/rustc_codegen_ssa/src/back/write.rs

+11
Original file line numberDiff line numberDiff line change
@@ -1795,6 +1795,7 @@ enum SharedEmitterMessage {
17951795
Diagnostic(Diagnostic),
17961796
InlineAsmError(u32, String, Level, Option<(String, Vec<InnerSpan>)>),
17971797
Fatal(String),
1798+
Artifact(PathBuf, String),
17981799
}
17991800

18001801
#[derive(Clone)]
@@ -1864,6 +1865,13 @@ impl Emitter for SharedEmitter {
18641865
);
18651866
}
18661867

1868+
fn emit_artifact_notification(&mut self, path: &Path, artifact_type: &str) {
1869+
drop(
1870+
self.sender
1871+
.send(SharedEmitterMessage::Artifact(path.to_owned(), artifact_type.to_owned())),
1872+
)
1873+
}
1874+
18671875
fn source_map(&self) -> Option<&Lrc<SourceMap>> {
18681876
None
18691877
}
@@ -1939,6 +1947,9 @@ impl SharedEmitterMain {
19391947
Ok(SharedEmitterMessage::Fatal(msg)) => {
19401948
sess.dcx().fatal(msg);
19411949
}
1950+
Ok(SharedEmitterMessage::Artifact(path, artifact_type)) => {
1951+
sess.dcx().emit_artifact_notification(&path, &artifact_type);
1952+
}
19421953
Err(_) => {
19431954
break;
19441955
}

0 commit comments

Comments
 (0)