Skip to content

Rollup of 7 pull requests #141463

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
May 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use rustc_abi::Endian;

use crate::spec::{StackProbeType, Target, TargetMetadata, TargetOptions, base};
use crate::spec::{FramePointer, StackProbeType, Target, TargetMetadata, TargetOptions, base};

pub(crate) fn target() -> Target {
Target {
Expand All @@ -16,6 +16,10 @@ pub(crate) fn target() -> Target {
arch: "aarch64".into(),
options: TargetOptions {
features: "+v8a,+outline-atomics".into(),
// the AAPCS64 expects use of non-leaf frame pointers per
// https://github.com/ARM-software/abi-aa/blob/4492d1570eb70c8fd146623e0db65b2d241f12e7/aapcs64/aapcs64.rst#the-frame-pointer
// and we tend to encounter interesting bugs in AArch64 unwinding code if we do not
frame_pointer: FramePointer::NonLeaf,
max_atomic_width: Some(128),
stack_probes: StackProbeType::Inline,
mcount: "\u{1}_mcount".into(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use rustc_abi::Endian;

use crate::spec::{StackProbeType, Target, TargetMetadata, TargetOptions, base};
use crate::spec::{FramePointer, StackProbeType, Target, TargetMetadata, TargetOptions, base};

pub(crate) fn target() -> Target {
let mut base = base::linux_gnu::opts();
Expand All @@ -20,6 +20,10 @@ pub(crate) fn target() -> Target {
options: TargetOptions {
abi: "ilp32".into(),
features: "+v8a,+outline-atomics".into(),
// the AAPCS64 expects use of non-leaf frame pointers per
// https://github.com/ARM-software/abi-aa/blob/4492d1570eb70c8fd146623e0db65b2d241f12e7/aapcs64/aapcs64.rst#the-frame-pointer
// and we tend to encounter interesting bugs in AArch64 unwinding code if we do not
frame_pointer: FramePointer::NonLeaf,
stack_probes: StackProbeType::Inline,
mcount: "\u{1}_mcount".into(),
endian: Endian::Big,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use crate::spec::{SanitizerSet, StackProbeType, Target, TargetMetadata, TargetOptions, base};
use crate::spec::{
FramePointer, SanitizerSet, StackProbeType, Target, TargetMetadata, TargetOptions, base,
};

// See https://developer.android.com/ndk/guides/abis.html#arm64-v8a
// for target ABI requirements.
Expand All @@ -20,6 +22,10 @@ pub(crate) fn target() -> Target {
// As documented in https://developer.android.com/ndk/guides/cpu-features.html
// the neon (ASIMD) and FP must exist on all android aarch64 targets.
features: "+v8a,+neon,+fp-armv8".into(),
// the AAPCS64 expects use of non-leaf frame pointers per
// https://github.com/ARM-software/abi-aa/blob/4492d1570eb70c8fd146623e0db65b2d241f12e7/aapcs64/aapcs64.rst#the-frame-pointer
// and we tend to encounter interesting bugs in AArch64 unwinding code if we do not
frame_pointer: FramePointer::NonLeaf,
stack_probes: StackProbeType::Inline,
supported_sanitizers: SanitizerSet::CFI
| SanitizerSet::HWADDRESS
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use crate::spec::{SanitizerSet, StackProbeType, Target, TargetMetadata, TargetOptions, base};
use crate::spec::{
FramePointer, SanitizerSet, StackProbeType, Target, TargetMetadata, TargetOptions, base,
};

pub(crate) fn target() -> Target {
Target {
Expand All @@ -14,6 +16,10 @@ pub(crate) fn target() -> Target {
arch: "aarch64".into(),
options: TargetOptions {
features: "+v8a,+outline-atomics".into(),
// the AAPCS64 expects use of non-leaf frame pointers per
// https://github.com/ARM-software/abi-aa/blob/4492d1570eb70c8fd146623e0db65b2d241f12e7/aapcs64/aapcs64.rst#the-frame-pointer
// and we tend to encounter interesting bugs in AArch64 unwinding code if we do not
frame_pointer: FramePointer::NonLeaf,
mcount: "\u{1}_mcount".into(),
max_atomic_width: Some(128),
stack_probes: StackProbeType::Inline,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::spec::{StackProbeType, Target, TargetMetadata, TargetOptions, base};
use crate::spec::{FramePointer, StackProbeType, Target, TargetMetadata, TargetOptions, base};

pub(crate) fn target() -> Target {
Target {
Expand All @@ -15,6 +15,10 @@ pub(crate) fn target() -> Target {
options: TargetOptions {
abi: "ilp32".into(),
features: "+v8a,+outline-atomics".into(),
// the AAPCS64 expects use of non-leaf frame pointers per
// https://github.com/ARM-software/abi-aa/blob/4492d1570eb70c8fd146623e0db65b2d241f12e7/aapcs64/aapcs64.rst#the-frame-pointer
// and we tend to encounter interesting bugs in AArch64 unwinding code if we do not
frame_pointer: FramePointer::NonLeaf,
max_atomic_width: Some(128),
stack_probes: StackProbeType::Inline,
mcount: "\u{1}_mcount".into(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use crate::spec::{SanitizerSet, StackProbeType, Target, TargetMetadata, TargetOptions, base};
use crate::spec::{
FramePointer, SanitizerSet, StackProbeType, Target, TargetMetadata, TargetOptions, base,
};

pub(crate) fn target() -> Target {
let mut base = base::linux_musl::opts();
Expand Down Expand Up @@ -26,6 +28,12 @@ pub(crate) fn target() -> Target {
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(),
arch: "aarch64".into(),
options: TargetOptions { mcount: "\u{1}_mcount".into(), ..base },
options: TargetOptions {
// the AAPCS64 expects use of non-leaf frame pointers per
// https://github.com/ARM-software/abi-aa/blob/4492d1570eb70c8fd146623e0db65b2d241f12e7/aapcs64/aapcs64.rst#the-frame-pointer
// and we tend to encounter interesting bugs in AArch64 unwinding code if we do not
frame_pointer: FramePointer::NonLeaf,
mcount: "\u{1}_mcount".into(), ..base
},
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use crate::spec::{SanitizerSet, StackProbeType, Target, TargetMetadata, TargetOptions, base};
use crate::spec::{
FramePointer, SanitizerSet, StackProbeType, Target, TargetMetadata, TargetOptions, base,
};

pub(crate) fn target() -> Target {
let mut base = base::linux_ohos::opts();
Expand All @@ -16,6 +18,10 @@ pub(crate) fn target() -> Target {
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(),
arch: "aarch64".into(),
options: TargetOptions {
// the AAPCS64 expects use of non-leaf frame pointers per
// https://github.com/ARM-software/abi-aa/blob/4492d1570eb70c8fd146623e0db65b2d241f12e7/aapcs64/aapcs64.rst#the-frame-pointer
// and we tend to encounter interesting bugs in AArch64 unwinding code if we do not
frame_pointer: FramePointer::NonLeaf,
mcount: "\u{1}_mcount".into(),
stack_probes: StackProbeType::Inline,
supported_sanitizers: SanitizerSet::ADDRESS
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/hint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ pub const unsafe fn assert_unchecked(cond: bool) {
///
/// # Examples
///
/// ```
/// ```ignore-wasm
/// use std::sync::atomic::{AtomicBool, Ordering};
/// use std::sync::Arc;
/// use std::{hint, thread};
Expand Down
14 changes: 7 additions & 7 deletions library/core/src/sync/atomic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
//!
//! A simple spinlock:
//!
//! ```
//! ```ignore-wasm
//! use std::sync::Arc;
//! use std::sync::atomic::{AtomicUsize, Ordering};
//! use std::{hint, thread};
Expand Down Expand Up @@ -622,7 +622,7 @@ impl AtomicBool {
///
/// # Examples
///
/// ```
/// ```ignore-wasm
/// #![feature(atomic_from_mut)]
/// use std::sync::atomic::{AtomicBool, Ordering};
///
Expand Down Expand Up @@ -653,7 +653,7 @@ impl AtomicBool {
///
/// # Examples
///
/// ```
/// ```rust,ignore-wasm
/// #![feature(atomic_from_mut)]
/// use std::sync::atomic::{AtomicBool, Ordering};
///
Expand Down Expand Up @@ -1548,7 +1548,7 @@ impl<T> AtomicPtr<T> {
///
/// # Examples
///
/// ```
/// ```ignore-wasm
/// #![feature(atomic_from_mut)]
/// use std::ptr::null_mut;
/// use std::sync::atomic::{AtomicPtr, Ordering};
Expand Down Expand Up @@ -1585,7 +1585,7 @@ impl<T> AtomicPtr<T> {
///
/// # Examples
///
/// ```
/// ```ignore-wasm
/// #![feature(atomic_from_mut)]
/// use std::ptr::null_mut;
/// use std::sync::atomic::{AtomicPtr, Ordering};
Expand Down Expand Up @@ -2692,7 +2692,7 @@ macro_rules! atomic_int {
///
/// # Examples
///
/// ```
/// ```ignore-wasm
/// #![feature(atomic_from_mut)]
#[doc = concat!($extra_feature, "use std::sync::atomic::{", stringify!($atomic_type), ", Ordering};")]
///
Expand Down Expand Up @@ -2725,7 +2725,7 @@ macro_rules! atomic_int {
///
/// # Examples
///
/// ```
/// ```ignore-wasm
/// #![feature(atomic_from_mut)]
#[doc = concat!($extra_feature, "use std::sync::atomic::{", stringify!($atomic_type), ", Ordering};")]
///
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/sync/mpmc/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ impl<T> Channel<T> {
// After this point `head.block` is not modified again and it will be deallocated if it's
// non-null. The `Drop` code of the channel, which runs after this function, also attempts
// to deallocate `head.block` if it's non-null. Therefore this function must maintain the
// invariant that if a deallocation of head.block is attemped then it must also be set to
// invariant that if a deallocation of head.block is attempted then it must also be set to
// NULL. Failing to do so will lead to the Drop code attempting a double free. For this
// reason both reads above do an atomic swap instead of a simple atomic load.

Expand Down
Loading
Loading