Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ar_archive_writer"
version = "0.5.0"
version = "0.5.1"
edition = "2024"
license = "Apache-2.0 WITH LLVM-exception"
description = "A writer for object file ar archives"
Expand Down
12 changes: 6 additions & 6 deletions src/coff_import_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,11 @@ pub fn write_import_library<W: Write + Seek>(
}
name = Cow::Owned(mangled_name);
}
Err(_) if !e.noname && export_name.is_none() => {
return Err(Error::other(format!(
"Functions on Arm64EC must use the Arm64EC mangling scheme, but the function \"{name}\" does not. Either use the Arm64EC mangled name or set the `export_name`."
)));
}
Ok(None) if !e.noname && export_name.is_none() => {
let demangled_name = get_arm64ec_demangled_function_name(&name)
.ok_or_else(|| {
Expand All @@ -1002,12 +1007,7 @@ pub fn write_import_library<W: Write + Seek>(
name_type = ImportNameType::NameExportas;
export_name = Some(Cow::Owned(demangled_name));
}
Ok(None) => {}
Err(_) => {
return Err(Error::other(format!(
"Functions on Arm64EC must use the Arm64EC mangling scheme, but the function \"{name}\" does not."
)));
}
_ => {}
}
}

Expand Down