Skip to content

Commit

Permalink
Auto merge of rust-lang#136119 - Zalathar:rollup-gr7bpkr, r=Zalathar
Browse files Browse the repository at this point in the history
Rollup of 6 pull requests

Successful merges:

 - rust-lang#135876 (fix doc for std::sync::mpmc)
 - rust-lang#135961 (Fix 2/4 tests skipped by opt-dist)
 - rust-lang#136037 (Mark all NuttX targets as tier 3 target and support the standard library)
 - rust-lang#136098 (Downgrade `linker-warnings` to allow-by-default)
 - rust-lang#136110 (Miri subtree update)
 - rust-lang#136117 (Subtree update of `rust-analyzer`)

r? `@ghost`
`@rustbot` modify labels: rollup
  • Loading branch information
bors committed Jan 27, 2025
2 parents 5545959 + 6f260b0 commit f234d0f
Show file tree
Hide file tree
Showing 162 changed files with 2,288 additions and 1,422 deletions.
18 changes: 13 additions & 5 deletions compiler/rustc_lint_defs/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4091,6 +4091,7 @@ declare_lint! {
/// ### Example
///
/// ```rust,ignore (needs CLI args, platform-specific)
/// #[warn(linker_messages)]
/// extern "C" {
/// fn foo();
/// }
Expand All @@ -4104,17 +4105,24 @@ declare_lint! {
/// >>> referenced by rust_out.69edbd30df4ae57d-cgu.0
/// >>> rust_out.rust_out.69edbd30df4ae57d-cgu.0.rcgu.o:(rust_out::main::h3a90094b06757803)
/// |
/// = note: `#[warn(linker_messages)]` on by default
///
/// note: the lint level is defined here
/// --> warn.rs:1:9
/// |
/// 1 | #![warn(linker_messages)]
/// | ^^^^^^^^^^^^^^^
/// warning: 1 warning emitted
/// ```
///
/// ### Explanation
///
/// Linkers emit platform-specific and program-specific warnings that cannot be predicted in advance by the rust compiler.
/// They are forwarded by default, but can be disabled by adding `#![allow(linker_messages)]` at the crate root.
/// Linkers emit platform-specific and program-specific warnings that cannot be predicted in
/// advance by the Rust compiler. Such messages are ignored by default for now. While linker
/// warnings could be very useful they have been ignored for many years by essentially all
/// users, so we need to do a bit more work than just surfacing their text to produce a clear
/// and actionable warning of similar quality to our other diagnostics. See this tracking
/// issue for more details: <https://github.com/rust-lang/rust/issues/136096>.
pub LINKER_MESSAGES,
Warn,
Allow,
"warnings emitted at runtime by the target-specific linker program"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub(crate) fn target() -> Target {
description: Some("AArch64 NuttX".into()),
tier: Some(3),
host_tools: Some(false),
std: Some(false),
std: Some(true),
},
pointer_width: 64,
data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub(crate) fn target() -> Target {
description: Some("ARMv7-A Cortex-A with NuttX".into()),
tier: Some(3),
host_tools: Some(false),
std: Some(false),
std: Some(true),
},
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub(crate) fn target() -> Target {
description: Some("ARMv7-A Cortex-A with NuttX (hard float)".into()),
tier: Some(3),
host_tools: Some(false),
std: Some(false),
std: Some(true),
},
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ pub(crate) fn target() -> Target {
llvm_target: "riscv32".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
tier: Some(3),
host_tools: None,
std: None,
std: Some(true),
},
pointer_width: 32,
arch: "riscv32".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ pub(crate) fn target() -> Target {
llvm_target: "riscv32".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
tier: Some(3),
host_tools: None,
std: None,
std: Some(true),
},
pointer_width: 32,
arch: "riscv32".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ pub(crate) fn target() -> Target {
llvm_target: "riscv32".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
tier: Some(3),
host_tools: None,
std: None,
std: Some(true),
},
pointer_width: 32,
arch: "riscv32".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ pub(crate) fn target() -> Target {
data_layout: "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
tier: Some(3),
host_tools: None,
std: None,
std: Some(true),
},
llvm_target: "riscv64".into(),
pointer_width: 64,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ pub(crate) fn target() -> Target {
data_layout: "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
tier: Some(3),
host_tools: None,
std: None,
std: Some(true),
},
llvm_target: "riscv64".into(),
pointer_width: 64,
Expand Down
13 changes: 5 additions & 8 deletions compiler/rustc_target/src/spec/targets/thumbv6m_nuttx_eabi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ pub(crate) fn target() -> Target {
llvm_target: "thumbv6m-none-eabi".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
tier: Some(3),
host_tools: None,
std: None,
std: Some(true),
},
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
Expand All @@ -22,12 +22,9 @@ pub(crate) fn target() -> Target {
llvm_floatabi: Some(FloatAbi::Soft),
// The ARMv6-M architecture doesn't support unaligned loads/stores so we disable them
// with +strict-align.
// Also force-enable 32-bit atomics, which allows the use of atomic load/store only.
// The resulting atomics are ABI incompatible with atomics backed by libatomic.
features: "+strict-align,+atomics-32".into(),
// There are no atomic CAS instructions available in the instruction set of the ARMv6-M
// architecture
atomic_cas: false,
// The ARMv6-M doesn't support hardware atomic operations, use atomic builtins instead.
features: "+strict-align".into(),
max_atomic_width: Some(32),
..base::thumb::opts()
},
}
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_target/src/spec/targets/thumbv7a_nuttx_eabi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ pub(crate) fn target() -> Target {
llvm_target: "thumbv7a-none-eabi".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
tier: Some(3),
host_tools: None,
std: None,
std: Some(true),
},
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ pub(crate) fn target() -> Target {
llvm_target: "thumbv7a-none-eabihf".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
tier: Some(3),
host_tools: None,
std: None,
std: Some(true),
},
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ pub(crate) fn target() -> Target {
llvm_target: "thumbv7em-none-eabi".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
tier: Some(3),
host_tools: None,
std: None,
std: Some(true),
},
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ pub(crate) fn target() -> Target {
llvm_target: "thumbv7em-none-eabihf".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
tier: Some(3),
host_tools: None,
std: None,
std: Some(true),
},
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_target/src/spec/targets/thumbv7m_nuttx_eabi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ pub(crate) fn target() -> Target {
llvm_target: "thumbv7m-none-eabi".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
tier: Some(3),
host_tools: None,
std: None,
std: Some(true),
},
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ pub(crate) fn target() -> Target {
llvm_target: "thumbv8m.base-none-eabi".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
tier: Some(3),
host_tools: None,
std: None,
std: Some(true),
},
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ pub(crate) fn target() -> Target {
llvm_target: "thumbv8m.main-none-eabi".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
tier: Some(3),
host_tools: None,
std: None,
std: Some(true),
},
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ pub(crate) fn target() -> Target {
llvm_target: "thumbv8m.main-none-eabihf".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
tier: Some(3),
host_tools: None,
std: None,
std: Some(true),
},
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
Expand Down
16 changes: 12 additions & 4 deletions library/std/src/sync/mpmc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
//! infinite buffer.
//!
//! 2. A synchronous, bounded channel. The [`sync_channel`] function will
//! return a `(SyncSender, Receiver)` tuple where the storage for pending
//! return a `(Sender, Receiver)` tuple where the storage for pending
//! messages is a pre-allocated buffer of a fixed size. All sends will be
//! **synchronous** by blocking until there is buffer space available. Note
//! that a bound of 0 is allowed, causing the channel to become a "rendezvous"
Expand Down Expand Up @@ -360,9 +360,17 @@ impl<T> Sender<T> {
/// that a return value of [`Err`] means that the data will never be
/// received, but a return value of [`Ok`] does *not* mean that the data
/// will be received. It is possible for the corresponding receiver to
/// hang up immediately after this function returns [`Ok`].
/// hang up immediately after this function returns [`Ok`]. However, if
/// the channel is zero-capacity, it acts as a rendezvous channel and a
/// return value of [`Ok`] means that the data has been received.
///
/// This method will never block the current thread.
/// If the channel is full and not disconnected, this call will block until
/// the send operation can proceed. If the channel becomes disconnected,
/// this call will wake up and return an error. The returned error contains
/// the original message.
///
/// If called on a zero-capacity channel, this method will wait for a receive
/// operation to appear on the other side of the channel.
///
/// # Examples
///
Expand Down Expand Up @@ -650,7 +658,7 @@ impl<T> fmt::Debug for Sender<T> {
}

/// The receiving half of Rust's [`channel`] (or [`sync_channel`]) type.
/// Different threads can share this [`Sender`] by cloning it.
/// Different threads can share this [`Receiver`] by cloning it.
///
/// Messages sent to the channel can be retrieved using [`recv`].
///
Expand Down
1 change: 1 addition & 0 deletions src/ci/docker/host-aarch64/dist-aarch64-linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ RUN yum upgrade -y && \
gcc-c++ \
git \
glibc-devel \
glibc-static \
libedit-devel \
libstdc++-devel \
make \
Expand Down
34 changes: 17 additions & 17 deletions src/doc/rustc/src/platform-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ target | std | host | notes
[`aarch64-unknown-nto-qnx710`](platform-support/nto-qnx.md) | ✓ | | ARM64 QNX Neutrino 7.1 RTOS with default network stack (io-pkt) |
[`aarch64-unknown-nto-qnx710_iosock`](platform-support/nto-qnx.md) | ✓ | | ARM64 QNX Neutrino 7.1 RTOS with new network stack (io-sock) |
[`aarch64-unknown-nto-qnx800`](platform-support/nto-qnx.md) | ✓ | | ARM64 QNX Neutrino 8.0 RTOS |
[`aarch64-unknown-nuttx`](platform-support/nuttx.md) | * | | ARM64 with NuttX
[`aarch64-unknown-nuttx`](platform-support/nuttx.md) | | | ARM64 with NuttX
[`aarch64-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | ARM64 OpenBSD
[`aarch64-unknown-redox`](platform-support/redox.md) | ✓ | | ARM64 Redox OS
[`aarch64-unknown-teeos`](platform-support/aarch64-unknown-teeos.md) | ? | | ARM64 TEEOS |
Expand Down Expand Up @@ -298,8 +298,8 @@ target | std | host | notes
[`armv7k-apple-watchos`](platform-support/apple-watchos.md) | ✓ | | Armv7-A Apple WatchOS
[`armv7s-apple-ios`](platform-support/apple-ios.md) | ✓ | | Armv7-A Apple-A6 Apple iOS
[`armv8r-none-eabihf`](platform-support/armv8r-none-eabihf.md) | * | | Bare Armv8-R, hardfloat
[`armv7a-nuttx-eabi`](platform-support/nuttx.md) | * | | ARMv7-A with NuttX
[`armv7a-nuttx-eabihf`](platform-support/nuttx.md) | * | | ARMv7-A with NuttX, hardfloat
[`armv7a-nuttx-eabi`](platform-support/nuttx.md) | | | ARMv7-A with NuttX
[`armv7a-nuttx-eabihf`](platform-support/nuttx.md) | | | ARMv7-A with NuttX, hardfloat
`avr-unknown-gnu-atmega328` | * | | AVR. Requires `-Z build-std=core`
`bpfeb-unknown-none` | * | | BPF (big endian)
`bpfel-unknown-none` | * | | BPF (little endian)
Expand Down Expand Up @@ -369,40 +369,40 @@ target | std | host | notes
[`riscv32im-risc0-zkvm-elf`](platform-support/riscv32im-risc0-zkvm-elf.md) | ? | | RISC Zero's zero-knowledge Virtual Machine (RV32IM ISA)
[`riscv32ima-unknown-none-elf`](platform-support/riscv32-unknown-none-elf.md) | * | | Bare RISC-V (RV32IMA ISA)
[`riscv32imac-esp-espidf`](platform-support/esp-idf.md) | ✓ | | RISC-V ESP-IDF
[`riscv32imac-unknown-nuttx-elf`](platform-support/nuttx.md) | * | | RISC-V 32bit with NuttX
[`riscv32imac-unknown-nuttx-elf`](platform-support/nuttx.md) | | | RISC-V 32bit with NuttX
[`riscv32imac-unknown-xous-elf`](platform-support/riscv32imac-unknown-xous-elf.md) | ? | | RISC-V Xous (RV32IMAC ISA)
[`riscv32imafc-esp-espidf`](platform-support/esp-idf.md) | ✓ | | RISC-V ESP-IDF
[`riscv32imafc-unknown-nuttx-elf`](platform-support/nuttx.md) | * | | RISC-V 32bit with NuttX
[`riscv32imafc-unknown-nuttx-elf`](platform-support/nuttx.md) | | | RISC-V 32bit with NuttX
[`riscv32imc-esp-espidf`](platform-support/esp-idf.md) | ✓ | | RISC-V ESP-IDF
[`riscv32imc-unknown-nuttx-elf`](platform-support/nuttx.md) | * | | RISC-V 32bit with NuttX
[`riscv32imc-unknown-nuttx-elf`](platform-support/nuttx.md) | | | RISC-V 32bit with NuttX
[`riscv64-linux-android`](platform-support/android.md) | ? | | RISC-V 64-bit Android
[`riscv64-wrs-vxworks`](platform-support/vxworks.md) | ✓ | |
`riscv64gc-unknown-freebsd` | ? | | RISC-V FreeBSD
`riscv64gc-unknown-fuchsia` | ? | | RISC-V Fuchsia
[`riscv64gc-unknown-hermit`](platform-support/hermit.md) | ✓ | | RISC-V Hermit
[`riscv64gc-unknown-netbsd`](platform-support/netbsd.md) | ✓ | ✓ | RISC-V NetBSD
[`riscv64gc-unknown-nuttx-elf`](platform-support/nuttx.md) | * | | RISC-V 64bit with NuttX
[`riscv64gc-unknown-nuttx-elf`](platform-support/nuttx.md) | | | RISC-V 64bit with NuttX
[`riscv64gc-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | OpenBSD/riscv64
[`riscv64imac-unknown-nuttx-elf`](platform-support/nuttx.md) | * | | RISC-V 64bit with NuttX
[`riscv64imac-unknown-nuttx-elf`](platform-support/nuttx.md) | | | RISC-V 64bit with NuttX
[`s390x-unknown-linux-musl`](platform-support/s390x-unknown-linux-musl.md) | ✓ | | S390x Linux (kernel 3.2, musl 1.2.3)
`sparc-unknown-linux-gnu` | ✓ | | 32-bit SPARC Linux
[`sparc-unknown-none-elf`](./platform-support/sparc-unknown-none-elf.md) | * | | Bare 32-bit SPARC V7+
[`sparc64-unknown-netbsd`](platform-support/netbsd.md) | ✓ | ✓ | NetBSD/sparc64
[`sparc64-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | OpenBSD/sparc64
[`thumbv4t-none-eabi`](platform-support/armv4t-none-eabi.md) | * | | Thumb-mode Bare Armv4T
[`thumbv5te-none-eabi`](platform-support/armv5te-none-eabi.md) | * | | Thumb-mode Bare Armv5TE
[`thumbv6m-nuttx-eabi`](platform-support/nuttx.md) | * | | ARMv6M with NuttX
[`thumbv6m-nuttx-eabi`](platform-support/nuttx.md) | | | ARMv6M with NuttX
`thumbv7a-pc-windows-msvc` | | |
[`thumbv7a-uwp-windows-msvc`](platform-support/uwp-windows-msvc.md) | | |
[`thumbv7a-nuttx-eabi`](platform-support/nuttx.md) | * | | ARMv7-A with NuttX
[`thumbv7a-nuttx-eabihf`](platform-support/nuttx.md) | * | | ARMv7-A with NuttX, hardfloat
[`thumbv7em-nuttx-eabi`](platform-support/nuttx.md) | * | | ARMv7EM with NuttX
[`thumbv7em-nuttx-eabihf`](platform-support/nuttx.md) | * | | ARMv7EM with NuttX, hardfloat
[`thumbv7m-nuttx-eabi`](platform-support/nuttx.md) | * | | ARMv7M with NuttX
[`thumbv7a-nuttx-eabi`](platform-support/nuttx.md) | | | ARMv7-A with NuttX
[`thumbv7a-nuttx-eabihf`](platform-support/nuttx.md) | | | ARMv7-A with NuttX, hardfloat
[`thumbv7em-nuttx-eabi`](platform-support/nuttx.md) | | | ARMv7EM with NuttX
[`thumbv7em-nuttx-eabihf`](platform-support/nuttx.md) | | | ARMv7EM with NuttX, hardfloat
[`thumbv7m-nuttx-eabi`](platform-support/nuttx.md) | | | ARMv7M with NuttX
`thumbv7neon-unknown-linux-musleabihf` | ? | | Thumb2-mode Armv7-A Linux with NEON, musl 1.2.3
[`thumbv8m.base-nuttx-eabi`](platform-support/nuttx.md) | * | | ARMv8M Baseline with NuttX
[`thumbv8m.main-nuttx-eabi`](platform-support/nuttx.md) | * | | ARMv8M Mainline with NuttX
[`thumbv8m.main-nuttx-eabihf`](platform-support/nuttx.md) | * | | ARMv8M Mainline with NuttX, hardfloat
[`thumbv8m.base-nuttx-eabi`](platform-support/nuttx.md) | | | ARMv8M Baseline with NuttX
[`thumbv8m.main-nuttx-eabi`](platform-support/nuttx.md) | | | ARMv8M Mainline with NuttX
[`thumbv8m.main-nuttx-eabihf`](platform-support/nuttx.md) | | | ARMv8M Mainline with NuttX, hardfloat
[`wasm64-unknown-unknown`](platform-support/wasm64-unknown-unknown.md) | ? | | WebAssembly
[`x86_64-apple-tvos`](platform-support/apple-tvos.md) | ✓ | | x86 64-bit tvOS
[`x86_64-apple-watchos-sim`](platform-support/apple-watchos.md) | ✓ | | x86 64-bit Apple WatchOS simulator
Expand Down
4 changes: 3 additions & 1 deletion src/tools/miri/ci/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ function endgroup {
begingroup "Building Miri"

# Global configuration
export RUSTFLAGS="-D warnings"
# We are getting some odd linker warnings on macOS, make sure they do not fail the build.
# (See <https://github.com/rust-lang/rust/issues/136086>.)
export RUSTFLAGS="-D warnings -A linker-messages"
export CARGO_INCREMENTAL=0
export CARGO_EXTRA_FLAGS="--locked"

Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri/rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
01706e1a34c87656fcbfce198608f4cd2ac6461a
2f0ad2a71e4a4528bb80bcb24bf8fa4e50cb87c2
Loading

0 comments on commit f234d0f

Please sign in to comment.