Port ArchiveBuildFailure
This commit is contained in:
parent
978b5f73e4
commit
d32caf9ced
3 changed files with 11 additions and 2 deletions
|
@ -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 }),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -84,3 +84,9 @@ pub(crate) struct LinkageConstOrMutType {
|
|||
#[derive(SessionDiagnostic)]
|
||||
#[diag(codegen_llvm::sanitizer_memtag_requires_mte)]
|
||||
pub(crate) struct SanitizerMemtagRequiresMte;
|
||||
|
||||
#[derive(SessionDiagnostic)]
|
||||
#[diag(codegen_llvm::archive_build_failure)]
|
||||
pub(crate) struct ArchiveBuildFailure {
|
||||
pub error: std::io::Error,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue