Auto merge of #106704 - ecnelises:big_archive, r=bjorn3
Support AIX-style archive type Reading facility of AIX big archive has been supported by `object` since 0.30.0. Writing facility of AIX big archive has already been supported by `ar_archive_writer`, but we need to bump the version to support the new archive type enum.
This commit is contained in:
commit
39c6804b92
10 changed files with 49 additions and 40 deletions
|
@ -552,6 +552,7 @@ pub enum ArchiveKind {
|
|||
K_BSD,
|
||||
K_DARWIN,
|
||||
K_COFF,
|
||||
K_AIXBIG,
|
||||
}
|
||||
|
||||
// LLVMRustThinLTOData
|
||||
|
|
|
@ -137,6 +137,7 @@ impl FromStr for ArchiveKind {
|
|||
"bsd" => Ok(ArchiveKind::K_BSD),
|
||||
"darwin" => Ok(ArchiveKind::K_DARWIN),
|
||||
"coff" => Ok(ArchiveKind::K_COFF),
|
||||
"aix_big" => Ok(ArchiveKind::K_AIXBIG),
|
||||
_ => Err(()),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ edition = "2021"
|
|||
test = false
|
||||
|
||||
[dependencies]
|
||||
ar_archive_writer = "0.1.1"
|
||||
ar_archive_writer = "0.1.3"
|
||||
bitflags = "1.2.1"
|
||||
cc = "1.0.69"
|
||||
itertools = "0.10.1"
|
||||
|
|
|
@ -233,6 +233,7 @@ impl<'a> ArArchiveBuilder<'a> {
|
|||
"bsd" => ArchiveKind::Bsd,
|
||||
"darwin" => ArchiveKind::Darwin,
|
||||
"coff" => ArchiveKind::Coff,
|
||||
"aix_big" => ArchiveKind::AixBig,
|
||||
kind => {
|
||||
self.sess.emit_fatal(UnknownArchiveKind { kind });
|
||||
}
|
||||
|
|
|
@ -39,6 +39,7 @@ enum class LLVMRustArchiveKind {
|
|||
BSD,
|
||||
DARWIN,
|
||||
COFF,
|
||||
AIX_BIG,
|
||||
};
|
||||
|
||||
static Archive::Kind fromRust(LLVMRustArchiveKind Kind) {
|
||||
|
@ -51,6 +52,8 @@ static Archive::Kind fromRust(LLVMRustArchiveKind Kind) {
|
|||
return Archive::K_DARWIN;
|
||||
case LLVMRustArchiveKind::COFF:
|
||||
return Archive::K_COFF;
|
||||
case LLVMRustArchiveKind::AIX_BIG:
|
||||
return Archive::K_AIXBIG;
|
||||
default:
|
||||
report_fatal_error("Bad ArchiveKind.");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue