summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_codegen_gcc/src/archive.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--compiler/rustc_codegen_gcc/src/archive.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_gcc/src/archive.rs b/compiler/rustc_codegen_gcc/src/archive.rs
index 96c773101..f18ae7ea5 100644
--- a/compiler/rustc_codegen_gcc/src/archive.rs
+++ b/compiler/rustc_codegen_gcc/src/archive.rs
@@ -1,6 +1,8 @@
use std::fs::File;
use std::path::{Path, PathBuf};
+use crate::errors::RanlibFailure;
+
use rustc_codegen_ssa::back::archive::{ArchiveBuilder, ArchiveBuilderBuilder};
use rustc_session::Session;
@@ -182,7 +184,7 @@ impl<'a> ArchiveBuilder<'a> for ArArchiveBuilder<'a> {
std::process::Command::new("ranlib").arg(output).status().expect("Couldn't run ranlib");
if !status.success() {
- self.config.sess.fatal(&format!("Ranlib exited with code {:?}", status.code()));
+ self.config.sess.emit_fatal(RanlibFailure::new(status.code()));
}
any_members