1
Fork 0

Rollup merge of #123687 - bjorn3:ar_archive_writer_0_2_0, r=oli-obk

Update ar_archive_writer to 0.2.0

This adds a whole bunch of tests checking for any difference with llvm's archive writer. It also fixes two mistakes in the porting from C++ to Rust. The first one causes a divergence for Mach-O archives which may or may not be harmless. The second will definitively cause issues, but only applies to thin archives, which rustc currently doesn't create.
This commit is contained in:
Guillaume Gomez 2024-04-16 15:19:13 +02:00 committed by GitHub
commit 9a7adb8d81
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 11 deletions

View file

@ -285,14 +285,7 @@ impl<'a> ArArchiveBuilder<'a> {
.tempfile_in(output.parent().unwrap_or_else(|| Path::new("")))
.map_err(|err| io_error_context("couldn't create a temp file", err))?;
write_archive_to_stream(
archive_tmpfile.as_file_mut(),
&entries,
true,
archive_kind,
true,
false,
)?;
write_archive_to_stream(archive_tmpfile.as_file_mut(), &entries, archive_kind, false)?;
let any_entries = !entries.is_empty();
drop(entries);