Skip to content

Commit 39c6804

Browse files
committed
Auto merge of rust-lang#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.
2 parents 9c51cf7 + 7c8c9cf commit 39c6804

File tree

10 files changed

+49
-40
lines changed

10 files changed

+49
-40
lines changed

Cargo.lock

+31-34
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ version = 3
44

55
[[package]]
66
name = "addr2line"
7-
version = "0.17.0"
7+
version = "0.19.0"
88
source = "registry+https://github.com/rust-lang/crates.io-index"
9-
checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b"
9+
checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97"
1010
dependencies = [
1111
"compiler_builtins",
12-
"gimli",
12+
"gimli 0.27.2",
1313
"rustc-std-workspace-alloc",
1414
"rustc-std-workspace-core",
1515
]
@@ -149,7 +149,7 @@ version = "0.1.3"
149149
source = "registry+https://github.com/rust-lang/crates.io-index"
150150
checksum = "b0639441fd17a3197d1cbca8dc8768cc172a63b64b4bb6c372e8f41ed0acc9bb"
151151
dependencies = [
152-
"object 0.30.1",
152+
"object",
153153
]
154154

155155
[[package]]
@@ -215,16 +215,16 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
215215

216216
[[package]]
217217
name = "backtrace"
218-
version = "0.3.66"
218+
version = "0.3.67"
219219
source = "registry+https://github.com/rust-lang/crates.io-index"
220-
checksum = "cab84319d616cfb654d03394f38ab7e6f0919e181b1b57e1fd15e7fb4077d9a7"
220+
checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca"
221221
dependencies = [
222222
"addr2line",
223223
"cc",
224224
"cfg-if",
225225
"libc",
226226
"miniz_oxide",
227-
"object 0.29.0",
227+
"object",
228228
"rustc-demangle",
229229
]
230230

@@ -1187,13 +1187,11 @@ checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d"
11871187

11881188
[[package]]
11891189
name = "flate2"
1190-
version = "1.0.23"
1190+
version = "1.0.25"
11911191
source = "registry+https://github.com/rust-lang/crates.io-index"
1192-
checksum = "b39522e96686d38f4bc984b9198e3a0613264abaebaff2c5c918bfa6b6da09af"
1192+
checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841"
11931193
dependencies = [
1194-
"cfg-if",
11951194
"crc32fast",
1196-
"libc",
11971195
"miniz_oxide",
11981196
]
11991197

@@ -1409,12 +1407,20 @@ version = "0.26.2"
14091407
source = "registry+https://github.com/rust-lang/crates.io-index"
14101408
checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d"
14111409
dependencies = [
1412-
"compiler_builtins",
14131410
"fallible-iterator",
14141411
"indexmap",
1412+
"stable_deref_trait",
1413+
]
1414+
1415+
[[package]]
1416+
name = "gimli"
1417+
version = "0.27.2"
1418+
source = "registry+https://github.com/rust-lang/crates.io-index"
1419+
checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4"
1420+
dependencies = [
1421+
"compiler_builtins",
14151422
"rustc-std-workspace-alloc",
14161423
"rustc-std-workspace-core",
1417-
"stable_deref_trait",
14181424
]
14191425

14201426
[[package]]
@@ -1869,9 +1875,9 @@ checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a"
18691875

18701876
[[package]]
18711877
name = "libz-sys"
1872-
version = "1.1.3"
1878+
version = "1.1.8"
18731879
source = "registry+https://github.com/rust-lang/crates.io-index"
1874-
checksum = "de5435b8549c16d423ed0c03dbaafe57cf6c3344744f1242520d59c9d8ecec66"
1880+
checksum = "9702761c3935f8cc2f101793272e202c72b99da8f4224a19ddcf1279a6450bbf"
18751881
dependencies = [
18761882
"cc",
18771883
"libc",
@@ -2098,9 +2104,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
20982104

20992105
[[package]]
21002106
name = "miniz_oxide"
2101-
version = "0.5.3"
2107+
version = "0.6.2"
21022108
source = "registry+https://github.com/rust-lang/crates.io-index"
2103-
checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc"
2109+
checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa"
21042110
dependencies = [
21052111
"adler",
21062112
"compiler_builtins",
@@ -2200,29 +2206,20 @@ dependencies = [
22002206
"libc",
22012207
]
22022208

2203-
[[package]]
2204-
name = "object"
2205-
version = "0.29.0"
2206-
source = "registry+https://github.com/rust-lang/crates.io-index"
2207-
checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53"
2208-
dependencies = [
2209-
"compiler_builtins",
2210-
"memchr",
2211-
"rustc-std-workspace-alloc",
2212-
"rustc-std-workspace-core",
2213-
]
2214-
22152209
[[package]]
22162210
name = "object"
22172211
version = "0.30.1"
22182212
source = "registry+https://github.com/rust-lang/crates.io-index"
22192213
checksum = "8d864c91689fdc196779b98dba0aceac6118594c2df6ee5d943eb6a8df4d107a"
22202214
dependencies = [
2215+
"compiler_builtins",
22212216
"crc32fast",
22222217
"flate2",
22232218
"hashbrown 0.13.1",
22242219
"indexmap",
22252220
"memchr",
2221+
"rustc-std-workspace-alloc",
2222+
"rustc-std-workspace-core",
22262223
]
22272224

22282225
[[package]]
@@ -3073,7 +3070,7 @@ dependencies = [
30733070
"cstr",
30743071
"libc",
30753072
"measureme",
3076-
"object 0.30.1",
3073+
"object",
30773074
"rustc-demangle",
30783075
"rustc_ast",
30793076
"rustc_attr",
@@ -3110,7 +3107,7 @@ dependencies = [
31103107
"itertools",
31113108
"jobserver",
31123109
"libc",
3113-
"object 0.30.1",
3110+
"object",
31143111
"pathdiff",
31153112
"regex",
31163113
"rustc_arena",
@@ -4498,7 +4495,7 @@ dependencies = [
44984495
"hermit-abi 0.3.0",
44994496
"libc",
45004497
"miniz_oxide",
4501-
"object 0.29.0",
4498+
"object",
45024499
"panic_abort",
45034500
"panic_unwind",
45044501
"profiler_builtins",
@@ -4766,9 +4763,9 @@ version = "0.4.0"
47664763
source = "registry+https://github.com/rust-lang/crates.io-index"
47674764
checksum = "da8fbf660a019b6bf11ea95762041464aa9099cc293b6a66d77cea5107619671"
47684765
dependencies = [
4769-
"gimli",
4766+
"gimli 0.26.2",
47704767
"hashbrown 0.12.3",
4771-
"object 0.30.1",
4768+
"object",
47724769
"tracing",
47734770
]
47744771

compiler/rustc_codegen_llvm/src/llvm/ffi.rs

+1
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,7 @@ pub enum ArchiveKind {
552552
K_BSD,
553553
K_DARWIN,
554554
K_COFF,
555+
K_AIXBIG,
555556
}
556557

557558
// LLVMRustThinLTOData

compiler/rustc_codegen_llvm/src/llvm/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ impl FromStr for ArchiveKind {
137137
"bsd" => Ok(ArchiveKind::K_BSD),
138138
"darwin" => Ok(ArchiveKind::K_DARWIN),
139139
"coff" => Ok(ArchiveKind::K_COFF),
140+
"aix_big" => Ok(ArchiveKind::K_AIXBIG),
140141
_ => Err(()),
141142
}
142143
}

compiler/rustc_codegen_ssa/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition = "2021"
77
test = false
88

99
[dependencies]
10-
ar_archive_writer = "0.1.1"
10+
ar_archive_writer = "0.1.3"
1111
bitflags = "1.2.1"
1212
cc = "1.0.69"
1313
itertools = "0.10.1"

compiler/rustc_codegen_ssa/src/back/archive.rs

+1
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ impl<'a> ArArchiveBuilder<'a> {
233233
"bsd" => ArchiveKind::Bsd,
234234
"darwin" => ArchiveKind::Darwin,
235235
"coff" => ArchiveKind::Coff,
236+
"aix_big" => ArchiveKind::AixBig,
236237
kind => {
237238
self.sess.emit_fatal(UnknownArchiveKind { kind });
238239
}

compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ enum class LLVMRustArchiveKind {
3939
BSD,
4040
DARWIN,
4141
COFF,
42+
AIX_BIG,
4243
};
4344

4445
static Archive::Kind fromRust(LLVMRustArchiveKind Kind) {
@@ -51,6 +52,8 @@ static Archive::Kind fromRust(LLVMRustArchiveKind Kind) {
5152
return Archive::K_DARWIN;
5253
case LLVMRustArchiveKind::COFF:
5354
return Archive::K_COFF;
55+
case LLVMRustArchiveKind::AIX_BIG:
56+
return Archive::K_AIXBIG;
5457
default:
5558
report_fatal_error("Bad ArchiveKind.");
5659
}

library/std/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ hashbrown = { version = "0.12", default-features = false, features = ['rustc-dep
2323
std_detect = { path = "../stdarch/crates/std_detect", default-features = false, features = ['rustc-dep-of-std'] }
2424

2525
# Dependencies of the `backtrace` crate
26-
addr2line = { version = "0.17.0", optional = true, default-features = false }
26+
addr2line = { version = "0.19.0", optional = true, default-features = false }
2727
rustc-demangle = { version = "0.1.21", features = ['rustc-dep-of-std'] }
28-
miniz_oxide = { version = "0.5.0", optional = true, default-features = false }
28+
miniz_oxide = { version = "0.6.0", optional = true, default-features = false }
2929
[dependencies.object]
30-
version = "0.29.0"
30+
version = "0.30.0"
3131
optional = true
3232
default-features = false
3333
features = ['read_core', 'elf', 'macho', 'pe', 'unaligned', 'archive']

tests/ui/suggestions/issue-71394-no-from-impl.rs

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
// ignore-wasm
2+
// ignore-msvc
3+
// ignore-emscripten
4+
// ignore-uwp
5+
16
fn main() {
27
let data: &[u8] = &[0; 10];
38
let _: &[i8] = data.into();

tests/ui/suggestions/issue-71394-no-from-impl.stderr

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
error[E0277]: the trait bound `&[i8]: From<&[u8]>` is not satisfied
2-
--> $DIR/issue-71394-no-from-impl.rs:3:25
2+
--> $DIR/issue-71394-no-from-impl.rs:8:25
33
|
44
LL | let _: &[i8] = data.into();
55
| ^^^^ the trait `From<&[u8]>` is not implemented for `&[i8]`
66
|
77
= help: the following other types implement trait `From<T>`:
8+
<&'input [u8] as From<gimli::read::endian_slice::EndianSlice<'input, Endian>>>
89
<[T; LANES] as From<Simd<T, LANES>>>
910
<[bool; LANES] as From<Mask<T, LANES>>>
1011
= note: required for `&[u8]` to implement `Into<&[i8]>`

0 commit comments

Comments
 (0)