summaryrefslogtreecommitdiffstats
path: root/vendor/ar_archive_writer
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:29 +0000
commit631cd5845e8de329d0e227aaa707d7ea228b8f8f (patch)
treea1b87c8f8cad01cf18f7c5f57a08f102771ed303 /vendor/ar_archive_writer
parentAdding debian version 1.69.0+dfsg1-1. (diff)
downloadrustc-631cd5845e8de329d0e227aaa707d7ea228b8f8f.tar.xz
rustc-631cd5845e8de329d0e227aaa707d7ea228b8f8f.zip
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/ar_archive_writer')
-rw-r--r--vendor/ar_archive_writer/.cargo-checksum.json2
-rw-r--r--vendor/ar_archive_writer/Cargo.toml5
-rw-r--r--vendor/ar_archive_writer/src/archive_writer.rs13
3 files changed, 12 insertions, 8 deletions
diff --git a/vendor/ar_archive_writer/.cargo-checksum.json b/vendor/ar_archive_writer/.cargo-checksum.json
index da8ef71d3..617f97344 100644
--- a/vendor/ar_archive_writer/.cargo-checksum.json
+++ b/vendor/ar_archive_writer/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"Cargo.toml":"d77e4458f855c3eb93853cd1c88103eeaae424400d5d0ea22432b6ebb5d7a5d8","LICENSE.txt":"f72b120d1385408e9e380acc020756eb6ba1b461d66c328ea67327ba08d7dcfd","Readme.md":"8c0cff5a6a4a4b9d0809de3551f80dd8b5badfaef57f8bb1a8de1595fd04b61b","src/Alignment.h":"f3d4503c7e6486a0b438ac485d1dde82eb6ae8c2b8139fc4bb84cd15c9b72373","src/Archive.h":"925a5cf40a176059a5305de9ab560f4f5d3ff88fd5625ce2f368f70c0f0521ba","src/ArchiveWriter.cpp":"f52ee7968a2e0066eda1d0e622b769a7e704758e12d4514a7095d12b6733fe1f","src/ArchiveWriter.h":"4b4f5e761656f2f521b27c10d7830f7f4754ef3f24671875857beda1bd768d6c","src/alignment.rs":"01d0581fc5125b004b466302a545419d816015b146f30e43482f2183b2cdd9a1","src/archive.rs":"24b987e9878518d72de98057446f95e0bd2060b6e4321361573813bec3108ea5","src/archive_writer.rs":"9711d78417afdd468e2c655f1eec7333fc7ec31ed6d4d50ac6b6053dbe897a1c","src/lib.rs":"24fb03b1d2f801794b95f72a65a5e3eaccac201594431e8f7de3d5252cdb49bc"},"package":"276881980556fdadeb88aa1ffc667e4d2e8fe72531dfabcb7a82bb3c9ea9ba31"} \ No newline at end of file
+{"files":{"Cargo.toml":"a8ef0588a1fca474f4bb1c902033b15d7c83bfe1764b4d14a3d295616751455f","LICENSE.txt":"f72b120d1385408e9e380acc020756eb6ba1b461d66c328ea67327ba08d7dcfd","Readme.md":"8c0cff5a6a4a4b9d0809de3551f80dd8b5badfaef57f8bb1a8de1595fd04b61b","src/Alignment.h":"f3d4503c7e6486a0b438ac485d1dde82eb6ae8c2b8139fc4bb84cd15c9b72373","src/Archive.h":"925a5cf40a176059a5305de9ab560f4f5d3ff88fd5625ce2f368f70c0f0521ba","src/ArchiveWriter.cpp":"f52ee7968a2e0066eda1d0e622b769a7e704758e12d4514a7095d12b6733fe1f","src/ArchiveWriter.h":"4b4f5e761656f2f521b27c10d7830f7f4754ef3f24671875857beda1bd768d6c","src/alignment.rs":"01d0581fc5125b004b466302a545419d816015b146f30e43482f2183b2cdd9a1","src/archive.rs":"24b987e9878518d72de98057446f95e0bd2060b6e4321361573813bec3108ea5","src/archive_writer.rs":"b17ee8a83b934079c8d8d49e39300efb495a939e561156aedab1db30761660e6","src/lib.rs":"24fb03b1d2f801794b95f72a65a5e3eaccac201594431e8f7de3d5252cdb49bc"},"package":"b0639441fd17a3197d1cbca8dc8768cc172a63b64b4bb6c372e8f41ed0acc9bb"} \ No newline at end of file
diff --git a/vendor/ar_archive_writer/Cargo.toml b/vendor/ar_archive_writer/Cargo.toml
index 20ed646c5..5af87a4bd 100644
--- a/vendor/ar_archive_writer/Cargo.toml
+++ b/vendor/ar_archive_writer/Cargo.toml
@@ -12,7 +12,7 @@
[package]
edition = "2021"
name = "ar_archive_writer"
-version = "0.1.1"
+version = "0.1.3"
description = "A writer for object file ar archives"
readme = "Readme.md"
keywords = [
@@ -21,10 +21,9 @@ keywords = [
]
license = "Apache-2.0 WITH LLVM-exception"
repository = "https://github.com/rust-lang/ar_archive_writer"
-resolver = "2"
[dependencies.object]
-version = "0.29.0"
+version = "0.30.0"
features = [
"std",
"read",
diff --git a/vendor/ar_archive_writer/src/archive_writer.rs b/vendor/ar_archive_writer/src/archive_writer.rs
index 24dcc3cfc..dbd8c623a 100644
--- a/vendor/ar_archive_writer/src/archive_writer.rs
+++ b/vendor/ar_archive_writer/src/archive_writer.rs
@@ -6,8 +6,8 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// Derived from:
-// * https://github.com/llvm/llvm-project/blob/8ef3e895ad8ab1724e2b87cabad1dacdc7a397a3/llvm/include/llvm/Object/ArchiveWriter.h
-// * https://github.com/llvm/llvm-project/blob/8ef3e895ad8ab1724e2b87cabad1dacdc7a397a3/llvm/lib/Object/ArchiveWriter.cpp
+// * https://github.com/llvm/llvm-project/blob/3d3ef9d073e1e27ea57480b371b7f5a9f5642ed2/llvm/include/llvm/Object/ArchiveWriter.h
+// * https://github.com/llvm/llvm-project/blob/3d3ef9d073e1e27ea57480b371b7f5a9f5642ed2/llvm/lib/Object/ArchiveWriter.cpp
use std::collections::HashMap;
use std::io::{self, Cursor, Seek, Write};
@@ -408,12 +408,17 @@ fn write_symbols(
has_object: &mut bool,
) -> io::Result<Vec<u64>> {
let mut ret = vec![];
- *has_object = get_symbols(buf, &mut |sym| {
+ // We only set has_object if get_symbols determines it's looking at an
+ // object file. This is because if we're creating an rlib, the archive will
+ // always end in lib.rmeta, and cause has_object to always become false.
+ if get_symbols(buf, &mut |sym| {
ret.push(sym_names.stream_position()?);
sym_names.write_all(sym)?;
sym_names.write_all(&[0])?;
Ok(())
- })?;
+ })? {
+ *has_object = true;
+ }
Ok(ret)
}