From 36a38206db1757dcf899644f758e6fc5a04141ad Mon Sep 17 00:00:00 2001 From: Jake Goulding Date: Mon, 11 Aug 2025 18:40:03 -0400 Subject: [PATCH 1/2] Use aarch64-apple-darwin as the fallback doc source for `-apple-` We are moving away from `x86_64-apple-darwin`, so soon these docs won't be available. --- src/tools/build-manifest/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/build-manifest/src/main.rs b/src/tools/build-manifest/src/main.rs index 0520eff0fa277..8f88ab10bf765 100644 --- a/src/tools/build-manifest/src/main.rs +++ b/src/tools/build-manifest/src/main.rs @@ -205,7 +205,7 @@ static TARGETS: &[&str] = &[ /// /// The order here matters, more specific entries should be first. static DOCS_FALLBACK: &[(&str, &str)] = &[ - ("-apple-", "x86_64-apple-darwin"), + ("-apple-", "aarch64-apple-darwin"), ("aarch64", "aarch64-unknown-linux-gnu"), ("arm-", "aarch64-unknown-linux-gnu"), ("", "x86_64-unknown-linux-gnu"), From c574c91e5739519b2fd3fdb5f07fa6e102705703 Mon Sep 17 00:00:00 2001 From: Jake Goulding Date: Mon, 11 Aug 2025 09:49:56 -0400 Subject: [PATCH 2/2] Demote x86_64-apple-darwin to Tier 2 with host tools Switch to only using aarch64 runners (implying we are now cross-compiling) and stop running tests. In the future, we could enable (some?) tests via Rosetta 2. --- .../src/spec/targets/x86_64_apple_darwin.rs | 2 +- src/ci/github-actions/jobs.yml | 45 +++++++------------ src/doc/rustc/src/platform-support.md | 2 +- .../src/platform-support/apple-darwin.md | 5 ++- 4 files changed, 21 insertions(+), 33 deletions(-) diff --git a/compiler/rustc_target/src/spec/targets/x86_64_apple_darwin.rs b/compiler/rustc_target/src/spec/targets/x86_64_apple_darwin.rs index 53e2cb469ee82..8892c50d84478 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_apple_darwin.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_apple_darwin.rs @@ -7,7 +7,7 @@ pub(crate) fn target() -> Target { llvm_target, metadata: TargetMetadata { description: Some("x86_64 Apple macOS (10.12+, Sierra+)".into()), - tier: Some(1), + tier: Some(2), host_tools: Some(true), std: Some(true), }, diff --git a/src/ci/github-actions/jobs.yml b/src/ci/github-actions/jobs.yml index ae13d14c38053..8cfcc0c5b15ef 100644 --- a/src/ci/github-actions/jobs.yml +++ b/src/ci/github-actions/jobs.yml @@ -23,10 +23,6 @@ runners: <<: *base-job - &job-macos - os: macos-13 - <<: *base-job - - - &job-macos-m1 os: macos-14 <<: *base-job @@ -68,17 +64,6 @@ runners: <<: *base-job envs: - env-x86_64-apple-tests: &env-x86_64-apple-tests - SCRIPT: ./x.py check compiletest --set build.compiletest-use-stage0-libtest=true && ./x.py --stage 2 test --skip tests/ui --skip tests/rustdoc -- --exact - RUST_CONFIGURE_ARGS: --build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc - # Ensure that host tooling is tested on our minimum supported macOS version. - MACOSX_DEPLOYMENT_TARGET: 10.12 - MACOSX_STD_DEPLOYMENT_TARGET: 10.12 - SELECT_XCODE: /Applications/Xcode_15.2.app - NO_LLVM_ASSERTIONS: 1 - NO_DEBUG_ASSERTIONS: 1 - NO_OVERFLOW_CHECKS: 1 - production: &production DEPLOY_BUCKET: rust-lang-ci2 @@ -455,8 +440,19 @@ auto: - name: dist-x86_64-apple env: - SCRIPT: ./x.py dist bootstrap --include-default-paths --host=x86_64-apple-darwin --target=x86_64-apple-darwin - RUST_CONFIGURE_ARGS: --enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc --set rust.lto=thin --set rust.codegen-units=1 + SCRIPT: >- + ./x.py dist bootstrap + --include-default-paths + --host=x86_64-apple-darwin + --target=x86_64-apple-darwin + RUST_CONFIGURE_ARGS: >- + --enable-full-tools + --enable-sanitizers + --enable-profiler + --disable-docs + --set rust.jemalloc + --set rust.lto=thin + --set rust.codegen-units=1 # Ensure that host tooling is built to support our minimum support macOS version. MACOSX_DEPLOYMENT_TARGET: 10.12 MACOSX_STD_DEPLOYMENT_TARGET: 10.12 @@ -482,17 +478,6 @@ auto: NO_LLVM_ASSERTIONS: 1 NO_DEBUG_ASSERTIONS: 1 NO_OVERFLOW_CHECKS: 1 - <<: *job-macos-m1 - - - name: x86_64-apple-1 - env: - <<: *env-x86_64-apple-tests - <<: *job-macos - - - name: x86_64-apple-2 - env: - SCRIPT: ./x.py --stage 2 test tests/ui tests/rustdoc - <<: *env-x86_64-apple-tests <<: *job-macos - name: dist-aarch64-apple @@ -517,7 +502,7 @@ auto: NO_OVERFLOW_CHECKS: 1 DIST_REQUIRE_ALL_TOOLS: 1 CODEGEN_BACKENDS: llvm,cranelift - <<: *job-macos-m1 + <<: *job-macos - name: aarch64-apple env: @@ -537,7 +522,7 @@ auto: NO_LLVM_ASSERTIONS: 1 NO_DEBUG_ASSERTIONS: 1 NO_OVERFLOW_CHECKS: 1 - <<: *job-macos-m1 + <<: *job-macos ###################### # Windows Builders # diff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md index 89b43cda9b909..c039517a97039 100644 --- a/src/doc/rustc/src/platform-support.md +++ b/src/doc/rustc/src/platform-support.md @@ -36,7 +36,6 @@ target | notes `aarch64-unknown-linux-gnu` | ARM64 Linux (kernel 4.1+, glibc 2.17+) [`i686-pc-windows-msvc`](platform-support/windows-msvc.md) | 32-bit MSVC (Windows 10+, Windows Server 2016+, Pentium 4) [^x86_32-floats-return-ABI] [^win32-msvc-alignment] `i686-unknown-linux-gnu` | 32-bit Linux (kernel 3.2+, glibc 2.17+, Pentium 4) [^x86_32-floats-return-ABI] -[`x86_64-apple-darwin`](platform-support/apple-darwin.md) | 64-bit macOS (10.12+, Sierra+) [`x86_64-pc-windows-gnu`](platform-support/windows-gnu.md) | 64-bit MinGW (Windows 10+, Windows Server 2016+) [`x86_64-pc-windows-msvc`](platform-support/windows-msvc.md) | 64-bit MSVC (Windows 10+, Windows Server 2016+) `x86_64-unknown-linux-gnu` | 64-bit Linux (kernel 3.2+, glibc 2.17+) @@ -106,6 +105,7 @@ target | notes [`riscv64gc-unknown-linux-gnu`](platform-support/riscv64gc-unknown-linux-gnu.md) | RISC-V Linux (kernel 4.20+, glibc 2.29) [`riscv64gc-unknown-linux-musl`](platform-support/riscv64gc-unknown-linux-musl.md) | RISC-V Linux (kernel 4.20+, musl 1.2.3) [`s390x-unknown-linux-gnu`](platform-support/s390x-unknown-linux-gnu.md) | S390x Linux (kernel 3.2+, glibc 2.17) +[`x86_64-apple-darwin`](platform-support/apple-darwin.md) | 64-bit macOS (10.12+, Sierra+) [`x86_64-pc-windows-gnullvm`](platform-support/windows-gnullvm.md) | 64-bit x86 MinGW (Windows 10+), LLVM ABI [`x86_64-unknown-freebsd`](platform-support/freebsd.md) | 64-bit x86 FreeBSD [`x86_64-unknown-illumos`](platform-support/illumos.md) | illumos diff --git a/src/doc/rustc/src/platform-support/apple-darwin.md b/src/doc/rustc/src/platform-support/apple-darwin.md index e41aee9bdb248..bdbb3a663f12a 100644 --- a/src/doc/rustc/src/platform-support/apple-darwin.md +++ b/src/doc/rustc/src/platform-support/apple-darwin.md @@ -4,9 +4,12 @@ Apple macOS targets. **Tier: 1** -- `x86_64-apple-darwin`: macOS on 64-bit x86. - `aarch64-apple-darwin`: macOS on ARM64 (M1-family or later Apple Silicon CPUs). +**Tier: 2** + +- `x86_64-apple-darwin`: macOS on 64-bit x86. + ## Target maintainers [@thomcc](https://github.com/thomcc)