Skip to content

Commit 8cd834e

Browse files
committed
Auto merge of #128030 - GuillaumeGomez:rollup-pp031e7, r=GuillaumeGomez
Rollup of 7 pull requests Successful merges: - #126450 (Promote Mac Catalyst targets to Tier 2, and ship with rustup) - #127177 (Distribute rustc_codegen_cranelift for arm64 macOS) - #127583 (Deal with invalid UTF-8 from `gai_strerror`) - #127977 (Update wasi-sdk in CI to latest release) - #127985 (Migrate `test-benches`, `c-unwind-abi-catch-panic` and `compiler-lookup-paths-2` `run-make` tests to rmake) - #128014 (Fix stab display in doc blocks) - #128023 (rustdoc: short descriptions cause word-breaks in tables) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 92c6c03 + ade4026 commit 8cd834e

File tree

22 files changed

+113
-56
lines changed

22 files changed

+113
-56
lines changed

compiler/rustc_codegen_cranelift/Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ For more docs on how to build and test see [build_system/usage.txt](build_system
7070
|FreeBSD|[^no-rustup]||||
7171
|AIX|[^xcoff]|N/A|N/A|[^xcoff]|
7272
|Other unixes|||||
73-
|macOS||[^no-rustup]|N/A|N/A|
73+
|macOS|||N/A|N/A|
7474
|Windows|[^no-rustup]||N/A|N/A|
7575

7676
✅: Fully supported and tested

library/std/src/sys/pal/unix/net.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use crate::io::{self, BorrowedBuf, BorrowedCursor, IoSlice, IoSliceMut};
44
use crate::mem;
55
use crate::net::{Shutdown, SocketAddr};
66
use crate::os::unix::io::{AsFd, AsRawFd, BorrowedFd, FromRawFd, IntoRawFd, RawFd};
7-
use crate::str;
87
use crate::sys::fd::FileDesc;
98
use crate::sys::pal::unix::IsMinusOne;
109
use crate::sys_common::net::{getsockopt, setsockopt, sockaddr_to_addr};
@@ -47,7 +46,9 @@ pub fn cvt_gai(err: c_int) -> io::Result<()> {
4746

4847
#[cfg(not(target_os = "espidf"))]
4948
let detail = unsafe {
50-
str::from_utf8(CStr::from_ptr(libc::gai_strerror(err)).to_bytes()).unwrap().to_owned()
49+
// We can't always expect a UTF-8 environment. When we don't get that luxury,
50+
// it's better to give a low-quality error message than none at all.
51+
CStr::from_ptr(libc::gai_strerror(err)).to_string_lossy()
5152
};
5253

5354
#[cfg(target_os = "espidf")]

src/bootstrap/src/utils/helpers.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,9 @@ pub fn target_supports_cranelift_backend(target: TargetSelection) -> bool {
203203
|| target.contains("aarch64")
204204
|| target.contains("s390x")
205205
|| target.contains("riscv64gc")
206-
} else if target.contains("darwin") || target.is_windows() {
206+
} else if target.contains("darwin") {
207+
target.contains("x86_64") || target.contains("aarch64")
208+
} else if target.is_windows() {
207209
target.contains("x86_64")
208210
} else {
209211
false

src/ci/docker/host-x86_64/dist-various-2/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ RUN /tmp/build-solaris-toolchain.sh sparcv9 sparcv9 solaris-sparc sun
8585
COPY host-x86_64/dist-various-2/build-x86_64-fortanix-unknown-sgx-toolchain.sh /tmp/
8686
RUN /tmp/build-x86_64-fortanix-unknown-sgx-toolchain.sh
8787

88-
RUN curl -L https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-22/wasi-sdk-22.0-linux.tar.gz | \
88+
RUN curl -L https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-23/wasi-sdk-23.0-x86_64-linux.tar.gz | \
8989
tar -xz
90-
ENV WASI_SDK_PATH=/tmp/wasi-sdk-22.0
90+
ENV WASI_SDK_PATH=/tmp/wasi-sdk-23.0-x86_64-linux
9191

9292
COPY scripts/freebsd-toolchain.sh /tmp/
9393
RUN /tmp/freebsd-toolchain.sh i686

src/ci/docker/host-x86_64/test-various/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ WORKDIR /
4040
COPY scripts/sccache.sh /scripts/
4141
RUN sh /scripts/sccache.sh
4242

43-
RUN curl -L https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-22/wasi-sdk-22.0-linux.tar.gz | \
43+
RUN curl -L https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-23/wasi-sdk-23.0-x86_64-linux.tar.gz | \
4444
tar -xz
45-
ENV WASI_SDK_PATH=/wasi-sdk-22.0
45+
ENV WASI_SDK_PATH=/wasi-sdk-23.0-x86_64-linux
4646

4747
ENV RUST_CONFIGURE_ARGS \
4848
--musl-root-x86_64=/usr/local/x86_64-linux-musl \

src/ci/github-actions/jobs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ auto:
285285

286286
- image: dist-apple-various
287287
env:
288-
SCRIPT: ./x.py dist bootstrap --include-default-paths --host='' --target=aarch64-apple-ios,x86_64-apple-ios,aarch64-apple-ios-sim
288+
SCRIPT: ./x.py dist bootstrap --include-default-paths --host='' --target=aarch64-apple-ios,x86_64-apple-ios,aarch64-apple-ios-sim,aarch64-apple-ios-macabi,x86_64-apple-ios-macabi
289289
RUST_CONFIGURE_ARGS: --enable-sanitizers --enable-profiler --set rust.jemalloc
290290
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
291291
MACOSX_DEPLOYMENT_TARGET: 10.12
@@ -326,6 +326,7 @@ auto:
326326
NO_DEBUG_ASSERTIONS: 1
327327
NO_OVERFLOW_CHECKS: 1
328328
DIST_REQUIRE_ALL_TOOLS: 1
329+
CODEGEN_BACKENDS: llvm,cranelift
329330
<<: *job-macos-m1
330331

331332
# This target only needs to support 11.0 and up as nothing else supports the hardware

src/doc/rustc/src/platform-support.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ so Rustup may install the documentation for a similar tier 1 target instead.
135135
target | std | notes
136136
-------|:---:|-------
137137
[`aarch64-apple-ios`](platform-support/apple-ios.md) | ✓ | ARM64 iOS
138+
[`aarch64-apple-ios-macabi`](platform-support/apple-ios-macabi.md) | ✓ | Mac Catalyst on ARM64
138139
[`aarch64-apple-ios-sim`](platform-support/apple-ios.md) | ✓ | Apple iOS Simulator on ARM64
139140
`aarch64-fuchsia` | ✓ | Alias for `aarch64-unknown-fuchsia`
140141
[`aarch64-unknown-fuchsia`](platform-support/fuchsia.md) | ✓ | ARM64 Fuchsia
@@ -195,6 +196,7 @@ target | std | notes
195196
[`wasm32-wasip1`](platform-support/wasm32-wasip1.md) | ✓ | WebAssembly with WASI
196197
[`wasm32-wasip1-threads`](platform-support/wasm32-wasip1-threads.md) | ✓ | WebAssembly with WASI Preview 1 and threads
197198
[`x86_64-apple-ios`](platform-support/apple-ios.md) | ✓ | 64-bit x86 iOS
199+
[`x86_64-apple-ios-macabi`](platform-support/apple-ios-macabi.md) | ✓ | Mac Catalyst on x86_64
198200
[`x86_64-fortanix-unknown-sgx`](platform-support/x86_64-fortanix-unknown-sgx.md) | ✓ | [Fortanix ABI] for 64-bit Intel SGX
199201
`x86_64-fuchsia` | ✓ | Alias for `x86_64-unknown-fuchsia`
200202
[`x86_64-unknown-fuchsia`](platform-support/fuchsia.md) | ✓ | 64-bit x86 Fuchsia
@@ -244,7 +246,6 @@ target | std | host | notes
244246
-------|:---:|:----:|-------
245247
[`arm64e-apple-ios`](platform-support/arm64e-apple-ios.md) | ✓ | | ARM64e Apple iOS
246248
[`arm64e-apple-darwin`](platform-support/arm64e-apple-darwin.md) | ✓ | ✓ | ARM64e Apple Darwin
247-
[`aarch64-apple-ios-macabi`](platform-support/apple-ios-macabi.md) | ✓ | | Apple Catalyst on ARM64
248249
[`aarch64-apple-tvos`](platform-support/apple-tvos.md) | ✓ | | ARM64 tvOS
249250
[`aarch64-apple-tvos-sim`](platform-support/apple-tvos.md) | ✓ | | ARM64 tvOS Simulator
250251
[`aarch64-apple-watchos`](platform-support/apple-watchos.md) | ✓ | | ARM64 Apple WatchOS
@@ -370,7 +371,6 @@ target | std | host | notes
370371
`thumbv7neon-unknown-linux-musleabihf` | ? | | Thumb2-mode Armv7-A Linux with NEON, musl 1.2.3
371372
[`wasm32-wasip2`](platform-support/wasm32-wasip2.md) | ✓ | | WebAssembly
372373
[`wasm64-unknown-unknown`](platform-support/wasm64-unknown-unknown.md) | ? | | WebAssembly
373-
[`x86_64-apple-ios-macabi`](platform-support/apple-ios-macabi.md) | ✓ | | Apple Catalyst on x86_64
374374
[`x86_64-apple-tvos`](platform-support/apple-tvos.md) | ✓ | | x86 64-bit tvOS
375375
[`x86_64-apple-watchos-sim`](platform-support/apple-watchos.md) | ✓ | | x86 64-bit Apple WatchOS simulator
376376
[`x86_64-pc-nto-qnx710`](platform-support/nto-qnx.md) | ✓ | | x86 64-bit QNX Neutrino 7.1 RTOS |

src/doc/rustc/src/platform-support/apple-ios-macabi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Apple Mac Catalyst targets.
44

5-
**Tier: 3**
5+
**Tier: 2 (without Host Tools)**
66

77
- `aarch64-apple-ios-macabi`: Mac Catalyst on ARM64.
88
- `x86_64-apple-ios-macabi`: Mac Catalyst on 64-bit x86.

src/librustdoc/html/static/css/rustdoc.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,10 @@ pre, .rustdoc.src .example-wrap {
831831
background: var(--table-alt-row-background-color);
832832
}
833833

834+
.docblock .stab, .docblock-short .stab {
835+
display: inline-block;
836+
}
837+
834838
/* "where ..." clauses with block display are also smaller */
835839
div.where {
836840
white-space: pre-wrap;
@@ -953,6 +957,7 @@ table,
953957
display: table;
954958
padding: 0;
955959
margin: 0;
960+
width: 100%;
956961
}
957962
.item-table > li {
958963
display: table-row;

src/tools/build-manifest/src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ static TARGETS: &[&str] = &[
5454
"arm64e-apple-darwin",
5555
"aarch64-apple-ios",
5656
"arm64e-apple-ios",
57+
"aarch64-apple-ios-macabi",
5758
"aarch64-apple-ios-sim",
5859
"aarch64-unknown-fuchsia",
5960
"aarch64-linux-android",
@@ -160,6 +161,7 @@ static TARGETS: &[&str] = &[
160161
"wasm32-wasip2",
161162
"x86_64-apple-darwin",
162163
"x86_64-apple-ios",
164+
"x86_64-apple-ios-macabi",
163165
"x86_64-fortanix-unknown-sgx",
164166
"x86_64-unknown-fuchsia",
165167
"x86_64-linux-android",

0 commit comments

Comments
 (0)