mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
Import error creating import library
This commit is contained in:
parent
69d412a073
commit
05ae7ecb74
@ -12,6 +12,7 @@ use std::str;
|
||||
use object::read::macho::FatArch;
|
||||
|
||||
use crate::common;
|
||||
use crate::errors::ErrorCreatingImportLibrary;
|
||||
use crate::llvm::archive_ro::{ArchiveRO, Child};
|
||||
use crate::llvm::{self, ArchiveKind, LLVMMachineType, LLVMRustCOFFShortExport};
|
||||
use rustc_codegen_ssa::back::archive::{ArchiveBuilder, ArchiveBuilderBuilder};
|
||||
@ -293,11 +294,10 @@ impl ArchiveBuilderBuilder for LlvmArchiveBuilderBuilder {
|
||||
};
|
||||
|
||||
if result == crate::llvm::LLVMRustResult::Failure {
|
||||
sess.fatal(&format!(
|
||||
"Error creating import library for {}: {}",
|
||||
sess.emit_fatal(ErrorCreatingImportLibrary {
|
||||
lib_name,
|
||||
llvm::last_error().unwrap_or("unknown LLVM error".to_string())
|
||||
));
|
||||
error: llvm::last_error().unwrap_or("unknown LLVM error".to_string()),
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
use rustc_errors::fluent;
|
||||
use rustc_errors::DiagnosticBuilder;
|
||||
use rustc_macros::SessionDiagnostic;
|
||||
use rustc_session::SessionDiagnostic;
|
||||
|
||||
pub(crate) enum UnknownCTargetFeature<'a> {
|
||||
@ -34,3 +35,10 @@ impl SessionDiagnostic<'_, ()> for UnknownCTargetFeature<'_> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(SessionDiagnostic)]
|
||||
#[diag(codegen_llvm::error_creating_import_library)]
|
||||
pub(crate) struct ErrorCreatingImportLibrary<'a> {
|
||||
pub lib_name: &'a str,
|
||||
pub error: String,
|
||||
}
|
||||
|
@ -12,3 +12,6 @@ codegen_llvm_rust_feature =
|
||||
|
||||
codegen_llvm_unknown_feature_fill_request =
|
||||
consider filing a feature request
|
||||
|
||||
codegen_llvm_error_creating_import_library =
|
||||
Error creating import library for {$lib_name}: {$error}
|
||||
|
Loading…
Reference in New Issue
Block a user