Port ErrorCallingDllTool
This commit is contained in:
parent
ddbb650289
commit
81f7a8d7f1
@ -12,7 +12,9 @@ use std::str;
|
||||
use object::read::macho::FatArch;
|
||||
|
||||
use crate::common;
|
||||
use crate::errors::{ArchiveBuildFailure, ErrorCreatingImportLibrary, ErrorWritingDEFFile};
|
||||
use crate::errors::{
|
||||
ArchiveBuildFailure, ErrorCallingDllTool, ErrorCreatingImportLibrary, ErrorWritingDEFFile,
|
||||
};
|
||||
use crate::llvm::archive_ro::{ArchiveRO, Child};
|
||||
use crate::llvm::{self, ArchiveKind, LLVMMachineType, LLVMRustCOFFShortExport};
|
||||
use rustc_codegen_ssa::back::archive::{ArchiveBuilder, ArchiveBuilderBuilder};
|
||||
@ -240,7 +242,7 @@ impl ArchiveBuilderBuilder for LlvmArchiveBuilderBuilder {
|
||||
|
||||
match result {
|
||||
Err(e) => {
|
||||
sess.fatal(&format!("Error calling dlltool: {}", e));
|
||||
sess.emit_fatal(ErrorCallingDllTool { error: e });
|
||||
}
|
||||
Ok(output) if !output.status.success() => sess.fatal(&format!(
|
||||
"Dlltool could not create import library: {}\n{}",
|
||||
|
@ -96,3 +96,9 @@ pub(crate) struct ArchiveBuildFailure {
|
||||
pub(crate) struct ErrorWritingDEFFile {
|
||||
pub error: std::io::Error,
|
||||
}
|
||||
|
||||
#[derive(SessionDiagnostic)]
|
||||
#[diag(codegen_llvm::error_calling_dlltool)]
|
||||
pub(crate) struct ErrorCallingDllTool {
|
||||
pub error: std::io::Error,
|
||||
}
|
||||
|
@ -42,3 +42,6 @@ codegen_llvm_archive_build_failure =
|
||||
|
||||
codegen_llvm_error_writing_def_file =
|
||||
Error writing .DEF file: {$error}
|
||||
|
||||
codegen_llvm_error_calling_dlltool =
|
||||
Error calling dlltool: {$error}
|
||||
|
Loading…
x
Reference in New Issue
Block a user