@@ -40,17 +40,18 @@ pub struct ImportLibraryItem {
40
40
pub is_data : bool ,
41
41
}
42
42
43
- impl From < ImportLibraryItem > for COFFShortExport {
44
- fn from ( item : ImportLibraryItem ) -> Self {
43
+ impl ImportLibraryItem {
44
+ fn into_coff_short_export ( self , sess : & Session ) -> COFFShortExport {
45
+ let import_name = ( sess. target . arch == "arm64ec" ) . then ( || self . name . clone ( ) ) ;
45
46
COFFShortExport {
46
- name : item . name ,
47
+ name : self . name ,
47
48
ext_name : None ,
48
- symbol_name : item . symbol_name ,
49
- import_name : None ,
49
+ symbol_name : self . symbol_name ,
50
+ import_name,
50
51
export_as : None ,
51
- ordinal : item . ordinal . unwrap_or ( 0 ) ,
52
- noname : item . ordinal . is_some ( ) ,
53
- data : item . is_data ,
52
+ ordinal : self . ordinal . unwrap_or ( 0 ) ,
53
+ noname : self . ordinal . is_some ( ) ,
54
+ data : self . is_data ,
54
55
private : false ,
55
56
constant : false ,
56
57
}
@@ -114,7 +115,8 @@ pub trait ArchiveBuilderBuilder {
114
115
. emit_fatal ( ErrorCreatingImportLibrary { lib_name, error : error. to_string ( ) } ) ,
115
116
} ;
116
117
117
- let exports = items. into_iter ( ) . map ( Into :: into) . collect :: < Vec < _ > > ( ) ;
118
+ let exports =
119
+ items. into_iter ( ) . map ( |item| item. into_coff_short_export ( sess) ) . collect :: < Vec < _ > > ( ) ;
118
120
let machine = match & * sess. target . arch {
119
121
"x86_64" => MachineTypes :: AMD64 ,
120
122
"x86" => MachineTypes :: I386 ,
0 commit comments