File tree Expand file tree Collapse file tree 5 files changed +12
-6
lines changed
rustc_codegen_llvm/src/back Expand file tree Collapse file tree 5 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,9 @@ impl<'a> ArchiveBuilder for LlvmArchiveBuilder<'a> {
101101 fn build ( mut self : Box < Self > , output : & Path ) -> bool {
102102 match self . build_with_llvm ( output) {
103103 Ok ( any_members) => any_members,
104- Err ( e) => self . sess . dcx ( ) . emit_fatal ( ArchiveBuildFailure { error : e } ) ,
104+ Err ( error) => {
105+ self . sess . dcx ( ) . emit_fatal ( ArchiveBuildFailure { path : output. to_owned ( ) , error } )
106+ }
105107 }
106108 }
107109}
Original file line number Diff line number Diff line change @@ -4,8 +4,7 @@ codegen_ssa_add_native_library = failed to add native library {$library_path}: {
44
55codegen_ssa_apple_sdk_error_sdk_path = failed to get { $sdk_name } SDK path: { $error }
66
7- codegen_ssa_archive_build_failure =
8- failed to build archive: { $error }
7+ codegen_ssa_archive_build_failure = failed to build archive at `{ $path } `: { $error }
98
109codegen_ssa_atomic_compare_exchange = Atomic compare-exchange intrinsic missing failure memory ordering
1110
@@ -198,7 +197,7 @@ codegen_ssa_read_file = failed to read file: {$message}
198197
199198codegen_ssa_repair_vs_build_tools = the Visual Studio build tools may need to be repaired using the Visual Studio installer
200199
201- codegen_ssa_rlib_archive_build_failure = failed to build archive from rlib: { $error }
200+ codegen_ssa_rlib_archive_build_failure = failed to build archive from rlib at ` { $path } ` : { $error }
202201
203202codegen_ssa_rlib_incompatible_dependency_formats = `{ $ty1 } ` and `{ $ty2 } ` do not have equivalent dependency formats (`{ $list1 } ` vs `{ $list2 } `)
204203
Original file line number Diff line number Diff line change @@ -220,7 +220,9 @@ impl<'a> ArchiveBuilder for ArArchiveBuilder<'a> {
220220 let sess = self . sess ;
221221 match self . build_inner ( output) {
222222 Ok ( any_members) => any_members,
223- Err ( e) => sess. dcx ( ) . emit_fatal ( ArchiveBuildFailure { error : e } ) ,
223+ Err ( error) => {
224+ sess. dcx ( ) . emit_fatal ( ArchiveBuildFailure { path : output. to_owned ( ) , error } )
225+ }
224226 }
225227 }
226228}
Original file line number Diff line number Diff line change @@ -2911,7 +2911,8 @@ fn add_static_crate(
29112911 false
29122912 } ) ,
29132913 ) {
2914- sess. dcx ( ) . emit_fatal ( errors:: RlibArchiveBuildFailure { error } ) ;
2914+ sess. dcx ( )
2915+ . emit_fatal ( errors:: RlibArchiveBuildFailure { path : cratepath. clone ( ) , error } ) ;
29152916 }
29162917 if archive. build ( & dst) {
29172918 link_upstream ( & dst) ;
Original file line number Diff line number Diff line change @@ -497,6 +497,7 @@ pub struct UnableToWriteDebuggerVisualizer {
497497#[ derive( Diagnostic ) ]
498498#[ diag( codegen_ssa_rlib_archive_build_failure) ]
499499pub struct RlibArchiveBuildFailure {
500+ pub path : PathBuf ,
500501 pub error : Error ,
501502}
502503
@@ -554,6 +555,7 @@ pub struct UnsupportedLinkSelfContained;
554555#[ diag( codegen_ssa_archive_build_failure) ]
555556// Public for rustc_codegen_llvm::back::archive
556557pub struct ArchiveBuildFailure {
558+ pub path : PathBuf ,
557559 pub error : std:: io:: Error ,
558560}
559561
You can’t perform that action at this time.
0 commit comments