Skip to content

Commit abb9b60

Browse files
committed
Fix "Remove src_files and remove_file"
1 parent fc0c753 commit abb9b60

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/archive.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ impl<'a> ArchiveBuilder<'a> for ArArchiveBuilder<'a> {
9292
Ok(())
9393
}
9494

95-
fn build(mut self) {
95+
fn build(mut self) -> bool {
9696
enum BuilderKind {
9797
Bsd(ar::Builder<File>),
9898
Gnu(ar::GnuBuilder<File>),
@@ -191,6 +191,8 @@ impl<'a> ArchiveBuilder<'a> for ArArchiveBuilder<'a> {
191191
)
192192
};
193193

194+
let any_members = !entries.is_empty();
195+
194196
// Add all files
195197
for (entry_name, data) in entries.into_iter() {
196198
let header = ar::Header::new(entry_name, data.len() as u64);
@@ -216,6 +218,8 @@ impl<'a> ArchiveBuilder<'a> for ArArchiveBuilder<'a> {
216218
self.sess.fatal(&format!("Ranlib exited with code {:?}", status.code()));
217219
}
218220
}
221+
222+
any_members
219223
}
220224

221225
fn inject_dll_import_lib(

0 commit comments

Comments
 (0)