Skip to content

Commit 9a7adb8

Browse files
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.
2 parents e7c13c3 + dacfbfc commit 9a7adb8

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

Cargo.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,9 @@ dependencies = [
210210

211211
[[package]]
212212
name = "ar_archive_writer"
213-
version = "0.1.5"
213+
version = "0.2.0"
214214
source = "registry+https://github.com/rust-lang/crates.io-index"
215-
checksum = "9792d37ca5173d7e7f4fe453739a0671d0557915a030a383d6b866476bbc3e71"
215+
checksum = "f0c269894b6fe5e9d7ada0cf69b5bf847ff35bc25fc271f08e1d080fce80339a"
216216
dependencies = [
217217
"object 0.32.2",
218218
]

compiler/rustc_codegen_ssa/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ edition = "2021"
55

66
[dependencies]
77
# tidy-alphabetical-start
8-
ar_archive_writer = "0.1.5"
8+
ar_archive_writer = "0.2.0"
99
bitflags = "2.4.1"
1010
cc = "1.0.90"
1111
itertools = "0.12"

compiler/rustc_codegen_ssa/src/back/archive.rs

+1-8
Original file line numberDiff line numberDiff line change
@@ -285,14 +285,7 @@ impl<'a> ArArchiveBuilder<'a> {
285285
.tempfile_in(output.parent().unwrap_or_else(|| Path::new("")))
286286
.map_err(|err| io_error_context("couldn't create a temp file", err))?;
287287

288-
write_archive_to_stream(
289-
archive_tmpfile.as_file_mut(),
290-
&entries,
291-
true,
292-
archive_kind,
293-
true,
294-
false,
295-
)?;
288+
write_archive_to_stream(archive_tmpfile.as_file_mut(), &entries, archive_kind, false)?;
296289

297290
let any_entries = !entries.is_empty();
298291
drop(entries);

0 commit comments

Comments
 (0)