about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/back/archive.rs
diff options
context:
space:
mode:
authorSLASHLogin <loginmlgxd@gmail.com>2022-08-26 14:11:47 +0200
committerSLASHLogin <loginmlgxd@gmail.com>2022-11-09 14:56:21 +0100
commitd32caf9cedd4f9777a1bcf3bde2913493f48bc6d (patch)
treeab92f0f7ced30e51326d75d8e29b0181c02e7d3d /compiler/rustc_codegen_llvm/src/back/archive.rs
parent978b5f73e4be94fc99c757b5a66bf297404202f2 (diff)
downloadrust-d32caf9cedd4f9777a1bcf3bde2913493f48bc6d.tar.gz
rust-d32caf9cedd4f9777a1bcf3bde2913493f48bc6d.zip
Port ArchiveBuildFailure
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/back/archive.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/back/archive.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/back/archive.rs b/compiler/rustc_codegen_llvm/src/back/archive.rs
index 4fd8b0ef4bb..e6ab0e74b7d 100644
--- a/compiler/rustc_codegen_llvm/src/back/archive.rs
+++ b/compiler/rustc_codegen_llvm/src/back/archive.rs
@@ -12,7 +12,7 @@ use std::str;
 use object::read::macho::FatArch;
 
 use crate::common;
-use crate::errors::ErrorCreatingImportLibrary;
+use crate::errors::{ErrorCreatingImportLibrary, ArchiveBuildFailure};
 use crate::llvm::archive_ro::{ArchiveRO, Child};
 use crate::llvm::{self, ArchiveKind, LLVMMachineType, LLVMRustCOFFShortExport};
 use rustc_codegen_ssa::back::archive::{ArchiveBuilder, ArchiveBuilderBuilder};
@@ -148,7 +148,7 @@ impl<'a> ArchiveBuilder<'a> for LlvmArchiveBuilder<'a> {
     fn build(mut self: Box<Self>, output: &Path) -> bool {
         match self.build_with_llvm(output) {
             Ok(any_members) => any_members,
-            Err(e) => self.sess.fatal(&format!("failed to build archive: {}", e)),
+            Err(e) => self.sess.emit_fatal(ArchiveBuildFailure { error: e }),
         }
     }
 }