diff options
| author | Daniel Paoliello <danpao@microsoft.com> | 2025-08-25 12:07:36 -0700 |
|---|---|---|
| committer | Daniel Paoliello <danpao@microsoft.com> | 2025-08-29 16:39:16 -0700 |
| commit | 4daae65228caf1bedef2e665102c03b17aa0fe86 (patch) | |
| tree | a4d25a5bfbb02810a4e625a9dca799287fde621c /compiler/rustc_codegen_ssa/src | |
| parent | da8f230d5f87a9a6113ed7774eec7f20268cf240 (diff) | |
| download | rust-4daae65228caf1bedef2e665102c03b17aa0fe86.tar.gz rust-4daae65228caf1bedef2e665102c03b17aa0fe86.zip | |
Move to 0.50.1
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/archive.rs | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/archive.rs b/compiler/rustc_codegen_ssa/src/back/archive.rs index 5bf2e653560..cfd8ceac3a6 100644 --- a/compiler/rustc_codegen_ssa/src/back/archive.rs +++ b/compiler/rustc_codegen_ssa/src/back/archive.rs @@ -40,17 +40,18 @@ pub struct ImportLibraryItem { pub is_data: bool, } -impl From<ImportLibraryItem> for COFFShortExport { - fn from(item: ImportLibraryItem) -> Self { +impl ImportLibraryItem { + fn into_coff_short_export(self, sess: &Session) -> COFFShortExport { + let import_name = (sess.target.arch == "arm64ec").then(|| self.name.clone()); COFFShortExport { - name: item.name, + name: self.name, ext_name: None, - symbol_name: item.symbol_name, - import_name: None, + symbol_name: self.symbol_name, + import_name, export_as: None, - ordinal: item.ordinal.unwrap_or(0), - noname: item.ordinal.is_some(), - data: item.is_data, + ordinal: self.ordinal.unwrap_or(0), + noname: self.ordinal.is_some(), + data: self.is_data, private: false, constant: false, } @@ -114,7 +115,8 @@ pub trait ArchiveBuilderBuilder { .emit_fatal(ErrorCreatingImportLibrary { lib_name, error: error.to_string() }), }; - let exports = items.into_iter().map(Into::into).collect::<Vec<_>>(); + let exports = + items.into_iter().map(|item| item.into_coff_short_export(sess)).collect::<Vec<_>>(); let machine = match &*sess.target.arch { "x86_64" => MachineTypes::AMD64, "x86" => MachineTypes::I386, |
