diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2024-04-09 17:44:20 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2024-04-09 17:45:02 +0000 |
| commit | dacfbfccc5da7c88e466af06be9468f2d10da03e (patch) | |
| tree | e83490a24600fd15872e88d5a05a63f98de4e6b1 | |
| parent | 033becf83c62814357f4810db149471db46ab816 (diff) | |
| download | rust-dacfbfccc5da7c88e466af06be9468f2d10da03e.tar.gz rust-dacfbfccc5da7c88e466af06be9468f2d10da03e.zip | |
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.
| -rw-r--r-- | Cargo.lock | 4 | ||||
| -rw-r--r-- | compiler/rustc_codegen_ssa/Cargo.toml | 2 | ||||
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/archive.rs | 9 |
3 files changed, 4 insertions, 11 deletions
diff --git a/Cargo.lock b/Cargo.lock index b1bdaef81ff..d8044c67a47 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -210,9 +210,9 @@ dependencies = [ [[package]] name = "ar_archive_writer" -version = "0.1.5" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9792d37ca5173d7e7f4fe453739a0671d0557915a030a383d6b866476bbc3e71" +checksum = "f0c269894b6fe5e9d7ada0cf69b5bf847ff35bc25fc271f08e1d080fce80339a" dependencies = [ "object 0.32.2", ] diff --git a/compiler/rustc_codegen_ssa/Cargo.toml b/compiler/rustc_codegen_ssa/Cargo.toml index baf10622a6d..f347a7fb0bb 100644 --- a/compiler/rustc_codegen_ssa/Cargo.toml +++ b/compiler/rustc_codegen_ssa/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" [dependencies] # tidy-alphabetical-start -ar_archive_writer = "0.1.5" +ar_archive_writer = "0.2.0" bitflags = "2.4.1" cc = "1.0.90" itertools = "0.12" diff --git a/compiler/rustc_codegen_ssa/src/back/archive.rs b/compiler/rustc_codegen_ssa/src/back/archive.rs index ef55682d541..d336973d2b9 100644 --- a/compiler/rustc_codegen_ssa/src/back/archive.rs +++ b/compiler/rustc_codegen_ssa/src/back/archive.rs @@ -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); |
