File tree 5 files changed +12
-6
lines changed
rustc_codegen_llvm/src/back
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> {
101
101
fn build ( mut self : Box < Self > , output : & Path ) -> bool {
102
102
match self . build_with_llvm ( output) {
103
103
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
+ }
105
107
}
106
108
}
107
109
}
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}: {
4
4
5
5
codegen_ssa_apple_sdk_error_sdk_path = failed to get { $sdk_name } SDK path: { $error }
6
6
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 }
9
8
10
9
codegen_ssa_atomic_compare_exchange = Atomic compare-exchange intrinsic missing failure memory ordering
11
10
@@ -198,7 +197,7 @@ codegen_ssa_read_file = failed to read file: {$message}
198
197
199
198
codegen_ssa_repair_vs_build_tools = the Visual Studio build tools may need to be repaired using the Visual Studio installer
200
199
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 }
202
201
203
202
codegen_ssa_rlib_incompatible_dependency_formats = `{ $ty1 } ` and `{ $ty2 } ` do not have equivalent dependency formats (`{ $list1 } ` vs `{ $list2 } `)
204
203
Original file line number Diff line number Diff line change @@ -220,7 +220,9 @@ impl<'a> ArchiveBuilder for ArArchiveBuilder<'a> {
220
220
let sess = self . sess ;
221
221
match self . build_inner ( output) {
222
222
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
+ }
224
226
}
225
227
}
226
228
}
Original file line number Diff line number Diff line change @@ -2911,7 +2911,8 @@ fn add_static_crate(
2911
2911
false
2912
2912
} ) ,
2913
2913
) {
2914
- sess. dcx ( ) . emit_fatal ( errors:: RlibArchiveBuildFailure { error } ) ;
2914
+ sess. dcx ( )
2915
+ . emit_fatal ( errors:: RlibArchiveBuildFailure { path : cratepath. clone ( ) , error } ) ;
2915
2916
}
2916
2917
if archive. build ( & dst) {
2917
2918
link_upstream ( & dst) ;
Original file line number Diff line number Diff line change @@ -497,6 +497,7 @@ pub struct UnableToWriteDebuggerVisualizer {
497
497
#[ derive( Diagnostic ) ]
498
498
#[ diag( codegen_ssa_rlib_archive_build_failure) ]
499
499
pub struct RlibArchiveBuildFailure {
500
+ pub path : PathBuf ,
500
501
pub error : Error ,
501
502
}
502
503
@@ -554,6 +555,7 @@ pub struct UnsupportedLinkSelfContained;
554
555
#[ diag( codegen_ssa_archive_build_failure) ]
555
556
// Public for rustc_codegen_llvm::back::archive
556
557
pub struct ArchiveBuildFailure {
558
+ pub path : PathBuf ,
557
559
pub error : std:: io:: Error ,
558
560
}
559
561
You can’t perform that action at this time.
0 commit comments