about summary refs log tree commit diff
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2024-07-22 16:44:02 +0800
committerGitHub <noreply@github.com>2024-07-22 16:44:02 +0800
commitb66b4020d8a34f1ac4e8566c568cff515d850bb7 (patch)
tree7302d15d08e039e0e31f8d8e292d57413b50a593
parentee0fd6caf770e8b3baa403b4da3ef0c7e274dc21 (diff)
parent9f7e049744bcbc77150c66f5ab39fd46c074a22c (diff)
Rollup merge of #127177 - bjorn3:arm64_macos_cg_clif, r=Mark-Simulacrum
Distribute rustc_codegen_cranelift for arm64 macOS

Support for arm64 macOS has been added to rustc_codegen_cranelift recently.

Fixes https://github.com/rust-lang/rustc_codegen_cranelift/issues/1502
-rw-r--r--compiler/rustc_codegen_cranelift/Readme.md2
-rw-r--r--src/bootstrap/src/utils/helpers.rs4
-rw-r--r--src/ci/github-actions/jobs.yml1
3 files changed, 5 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_cranelift/Readme.md b/compiler/rustc_codegen_cranelift/Readme.md
index eb21e027dd0..3b3c86a1bd1 100644
--- a/compiler/rustc_codegen_cranelift/Readme.md
+++ b/compiler/rustc_codegen_cranelift/Readme.md
@@ -70,7 +70,7 @@ For more docs on how to build and test see [build_system/usage.txt](build_system
 |FreeBSD|✅[^no-rustup]|❓|❓|❓|
 |AIX|❌[^xcoff]|N/A|N/A|❌[^xcoff]|
 |Other unixes|❓|❓|❓|❓|
-|macOS|✅|✅[^no-rustup]|N/A|N/A|
+|macOS|✅|✅|N/A|N/A|
 |Windows|✅[^no-rustup]|❌|N/A|N/A|
 
 ✅: Fully supported and tested
diff --git a/src/bootstrap/src/utils/helpers.rs b/src/bootstrap/src/utils/helpers.rs
index 773a873e47c..690d7318f94 100644
--- a/src/bootstrap/src/utils/helpers.rs
+++ b/src/bootstrap/src/utils/helpers.rs
@@ -203,7 +203,9 @@ pub fn target_supports_cranelift_backend(target: TargetSelection) -> bool {
             || target.contains("aarch64")
             || target.contains("s390x")
             || target.contains("riscv64gc")
-    } else if target.contains("darwin") || target.is_windows() {
+    } else if target.contains("darwin") {
+        target.contains("x86_64") || target.contains("aarch64")
+    } else if target.is_windows() {
         target.contains("x86_64")
     } else {
         false
diff --git a/src/ci/github-actions/jobs.yml b/src/ci/github-actions/jobs.yml
index a6e12c6ff95..638f14ad53f 100644
--- a/src/ci/github-actions/jobs.yml
+++ b/src/ci/github-actions/jobs.yml
@@ -326,6 +326,7 @@ auto:
       NO_DEBUG_ASSERTIONS: 1
       NO_OVERFLOW_CHECKS: 1
       DIST_REQUIRE_ALL_TOOLS: 1
+      CODEGEN_BACKENDS: llvm,cranelift
     <<: *job-macos-m1
 
   # This target only needs to support 11.0 and up as nothing else supports the hardware