Skip to content

Promote aarch64-apple-darwin to Tier 1 #128591

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

Closed
wants to merge 4 commits into from
Closed
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
4 changes: 0 additions & 4 deletions library/std/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,6 @@
#![cfg_attr(any(windows, target_os = "uefi"), feature(round_char_boundary))]
#![cfg_attr(target_family = "wasm", feature(stdarch_wasm_atomic_wait))]
#![cfg_attr(target_arch = "wasm64", feature(simd_wasm64))]
#![cfg_attr(
all(any(target_arch = "x86_64", target_arch = "x86"), target_os = "uefi"),
feature(stdarch_x86_has_cpuid)
)]
//
// Language features:
// tidy-alphabetical-start
Expand Down
8 changes: 0 additions & 8 deletions library/std/src/sys/pal/uefi/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,6 @@ pub(crate) mod instant_internal {

#[cfg(target_arch = "x86_64")]
fn timestamp_rdtsc() -> Option<Duration> {
if !crate::arch::x86_64::has_cpuid() {
return None;
}

static FREQUENCY: crate::sync::OnceLock<u64> = crate::sync::OnceLock::new();

// Get Frequency in Mhz
Expand All @@ -200,10 +196,6 @@ pub(crate) mod instant_internal {

#[cfg(target_arch = "x86")]
fn timestamp_rdtsc() -> Option<Duration> {
if !crate::arch::x86::has_cpuid() {
return None;
}

static FREQUENCY: crate::sync::OnceLock<u64> = crate::sync::OnceLock::new();

let freq = FREQUENCY
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/src/core/build_steps/llvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ pub(crate) fn is_ci_llvm_available(config: &Config, asserts: bool) -> bool {
let supported_platforms = [
// tier 1
("aarch64-unknown-linux-gnu", false),
("aarch64-apple-darwin", false),
("i686-pc-windows-gnu", false),
("i686-pc-windows-msvc", false),
("i686-unknown-linux-gnu", false),
Expand All @@ -202,7 +203,6 @@ pub(crate) fn is_ci_llvm_available(config: &Config, asserts: bool) -> bool {
("x86_64-pc-windows-gnu", true),
("x86_64-pc-windows-msvc", true),
// tier 2 with host tools
("aarch64-apple-darwin", false),
("aarch64-pc-windows-msvc", false),
("aarch64-unknown-linux-musl", false),
("arm-unknown-linux-gnueabi", false),
Expand Down
2 changes: 1 addition & 1 deletion src/doc/rustc/src/platform-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ All tier 1 targets with host tools support the full standard library.
target | notes
-------|-------
`aarch64-unknown-linux-gnu` | ARM64 Linux (kernel 4.1, glibc 2.17+)
[`aarch64-apple-darwin`](platform-support/apple-darwin.md) | ARM64 macOS (11.0+, Big Sur+)
`i686-pc-windows-gnu` | 32-bit MinGW (Windows 10+, Windows Server 2016+) [^x86_32-floats-return-ABI]
`i686-pc-windows-msvc` | 32-bit MSVC (Windows 10+, Windows Server 2016+) [^x86_32-floats-return-ABI]
`i686-unknown-linux-gnu` | 32-bit Linux (kernel 3.2+, glibc 2.17+) [^x86_32-floats-return-ABI]
Expand Down Expand Up @@ -86,7 +87,6 @@ so Rustup may install the documentation for a similar tier 1 target instead.

target | notes
-------|-------
[`aarch64-apple-darwin`](platform-support/apple-darwin.md) | ARM64 macOS (11.0+, Big Sur+)
`aarch64-pc-windows-msvc` | ARM64 Windows MSVC
`aarch64-unknown-linux-musl` | ARM64 Linux with musl 1.2.3
`arm-unknown-linux-gnueabi` | Armv6 Linux (kernel 3.2, glibc 2.17)
Expand Down
3 changes: 0 additions & 3 deletions src/doc/rustc/src/platform-support/apple-darwin.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ Apple macOS targets.
**Tier: 1**

- `x86_64-apple-darwin`: macOS on 64-bit x86.

**Tier: 2 (with Host Tools)**

- `aarch64-apple-darwin`: macOS on ARM64 (M1-family or later Apple Silicon CPUs).

## Target maintainers
Expand Down
2 changes: 1 addition & 1 deletion src/tools/cargo
Submodule cargo updated 40 files
+1 −1 CHANGELOG.md
+108 −100 Cargo.lock
+6 −6 Cargo.toml
+1 −1 crates/cargo-util-schemas/Cargo.toml
+47 −38 crates/cargo-util-schemas/src/manifest/mod.rs
+6 −1 crates/home/src/windows.rs
+2 −2 crates/xtask-build-man/src/main.rs
+1 −1 src/cargo/core/compiler/fingerprint/mod.rs
+1 −1 src/cargo/core/compiler/mod.rs
+15 −15 src/cargo/core/manifest.rs
+1 −1 src/cargo/core/shell.rs
+6 −6 src/cargo/core/workspace.rs
+10 −5 src/cargo/ops/cargo_package.rs
+2 −2 src/cargo/ops/fix.rs
+24 −38 src/cargo/ops/registry/publish.rs
+1 −1 src/cargo/ops/vendor.rs
+5 −5 src/cargo/sources/path.rs
+4 −4 src/cargo/util/context/mod.rs
+2 −2 src/cargo/util/lints.rs
+189 −172 src/cargo/util/toml/mod.rs
+31 −31 src/cargo/util/toml/targets.rs
+6 −0 src/doc/man/cargo.md
+21 −9 src/doc/man/generated_txt/cargo.txt
+18 −12 src/doc/src/commands/cargo.md
+13 −38 src/doc/src/faq.md
+13 −11 src/doc/src/reference/unstable.md
+26 −8 src/etc/man/cargo.1
+1 −4 tests/testsuite/cargo_add/rust_version_ignore/mod.rs
+1 −4 tests/testsuite/cargo_add/rust_version_incompatible/mod.rs
+1 −4 tests/testsuite/cargo_add/rust_version_latest/mod.rs
+1 −4 tests/testsuite/cargo_add/rust_version_older/mod.rs
+1 −4 tests/testsuite/cargo_add/rustc_ignore/mod.rs
+1 −4 tests/testsuite/cargo_add/rustc_incompatible/mod.rs
+1 −4 tests/testsuite/cargo_add/rustc_latest/mod.rs
+1 −4 tests/testsuite/cargo_add/rustc_older/mod.rs
+1 −1 tests/testsuite/check.rs
+2 −2 tests/testsuite/inheritable_workspace_fields.rs
+2 −0 tests/testsuite/jobserver.rs
+121 −103 tests/testsuite/publish.rs
+20 −71 tests/testsuite/rust_version.rs
1 change: 0 additions & 1 deletion src/tools/miri/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ degree documented below):
- All Rust [Tier 1 targets](https://doc.rust-lang.org/rustc/platform-support.html) are supported by
Miri. They are all checked on Miri's CI, and some (at least one per OS) are even checked on every
Rust PR, so the shipped Miri should always work on these targets.
- `aarch64-apple-darwin` is supported.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment here also needs updating now.

- `s390x-unknown-linux-gnu` is supported as our "big-endian target of choice".
- For every other target with OS `linux`, `macos`, or `windows`, Miri should generally work, but we
make no promises and we don't run tests for such targets.
Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri/ci/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ case $HOST_TARGET in
MANY_SEEDS=16 TEST_TARGET=x86_64-pc-windows-gnu run_tests
;;
aarch64-apple-darwin)
# Host (tier 2)
# Host
GC_STRESS=1 MIR_OPT=1 MANY_SEEDS=64 TEST_BENCH=1 CARGO_MIRI_ENV=1 run_tests
# Extra tier 1
MANY_SEEDS=64 TEST_TARGET=i686-pc-windows-gnu run_tests
Expand Down
9 changes: 0 additions & 9 deletions src/tools/rustfmt/tests/source/cfg_if/detect/os/x86.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,6 @@ pub fn check_for(x: Feature) -> bool {
fn detect_features() -> cache::Initializer {
let mut value = cache::Initializer::default();

// If the x86 CPU does not support the CPUID instruction then it is too
// old to support any of the currently-detectable features.
if !has_cpuid() {
return value;
}

// Calling `__cpuid`/`__cpuid_count` from here on is safe because the CPU
// has `cpuid` support.

// 0. EAX = 0: Basic Information:
// - EAX returns the "Highest Function Parameter", that is, the maximum
// leaf value for subsequent calls of `cpuinfo` in range [0,
Expand Down
9 changes: 0 additions & 9 deletions src/tools/rustfmt/tests/target/cfg_if/detect/os/x86.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,6 @@ pub fn check_for(x: Feature) -> bool {
fn detect_features() -> cache::Initializer {
let mut value = cache::Initializer::default();

// If the x86 CPU does not support the CPUID instruction then it is too
// old to support any of the currently-detectable features.
if !has_cpuid() {
return value;
}

// Calling `__cpuid`/`__cpuid_count` from here on is safe because the CPU
// has `cpuid` support.

// 0. EAX = 0: Basic Information:
// - EAX returns the "Highest Function Parameter", that is, the maximum
// leaf value for subsequent calls of `cpuinfo` in range [0,
Expand Down
Loading