about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-09-24 02:35:05 +0000
committerbors <bors@rust-lang.org>2023-09-24 02:35:05 +0000
commit42ca6e4e5760a548a6fa858482de6d237f6fb3b8 (patch)
tree8dbb8466a6ca11dd6e9e87f8f230369bbee65b64 /library/std/src
parent0f2a9ce53e49ad6c80266cacc0b97444b17ea36b (diff)
parent2044a2d7fa1de37aef704443dc127e5072a5d04c (diff)
downloadrust-42ca6e4e5760a548a6fa858482de6d237f6fb3b8.tar.gz
rust-42ca6e4e5760a548a6fa858482de6d237f6fb3b8.zip
Auto merge of #104385 - BlackHoleFox:apple-minimum-bumps, r=petrochenkov
Raise minimum supported Apple OS versions

This implements the proposal to raise the minimum supported Apple OS versions as laid out in the now-completed MCP (https://github.com/rust-lang/compiler-team/issues/556).

As of this PR, rustc and the stdlib now support these versions as the baseline:
- macOS: 10.12 Sierra
- iOS: 10
- tvOS: 10
- watchOS: 5 (Unchanged)

In addition to everything this breaks indirectly, these changes also erase the `armv7-apple-ios` target (currently tier 3) because the oldest supported iOS device now uses ARMv7s. Not sure what the policy around tier3 target removal is but shimming it is not an option due to the linker refusing.

[Per comment](https://github.com/rust-lang/compiler-team/issues/556#issuecomment-1297175073), this requires a FCP to merge. cc `@wesleywiser.`
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/sys/unix/thread_local_dtor.rs2
-rw-r--r--library/std/src/sys/unix/thread_parking/darwin.rs3
2 files changed, 2 insertions, 3 deletions
diff --git a/library/std/src/sys/unix/thread_local_dtor.rs b/library/std/src/sys/unix/thread_local_dtor.rs
index 1da41d4b4bf..fba2a676f28 100644
--- a/library/std/src/sys/unix/thread_local_dtor.rs
+++ b/library/std/src/sys/unix/thread_local_dtor.rs
@@ -48,7 +48,7 @@ pub unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern "C" fn(*mut u8)) {
 // workaround below is to register, via _tlv_atexit, a custom DTOR list once per
 // thread. thread_local dtors are pushed to the DTOR list without calling
 // _tlv_atexit.
-#[cfg(target_os = "macos")]
+#[cfg(any(target_os = "macos", target_os = "ios", target_os = "watchos"))]
 pub unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern "C" fn(*mut u8)) {
     use crate::cell::Cell;
     use crate::mem;
diff --git a/library/std/src/sys/unix/thread_parking/darwin.rs b/library/std/src/sys/unix/thread_parking/darwin.rs
index b709fada3b4..8231f3cba2d 100644
--- a/library/std/src/sys/unix/thread_parking/darwin.rs
+++ b/library/std/src/sys/unix/thread_parking/darwin.rs
@@ -2,8 +2,7 @@
 //!
 //! Darwin actually has futex syscalls (`__ulock_wait`/`__ulock_wake`), but they
 //! cannot be used in `std` because they are non-public (their use will lead to
-//! rejection from the App Store) and because they are only available starting
-//! with macOS version 10.12, even though the minimum target version is 10.7.
+//! rejection from the App Store).
 //!
 //! Therefore, we need to look for other synchronization primitives. Luckily, Darwin
 //! supports semaphores, which allow us to implement the behaviour we need with