Skip to content

Commit 43fc1b3

Browse files
committed
Auto merge of rust-lang#82601 - terhechte:catalyst-support-m1-fix, r=petrochenkov
Fixed support for macOS Catalyst on ARM64 When I initially added Arm64 Catalyst support in rust-lang#77484 I had access to a DTK. However, while waiting to merge the PR some other changes were merged which caused conflicts in the branch. When fixing those conflicts I had no access to the DTK anymore and didn't try out if the resulting binaries did indeed work on Apple Silicon. I finally have a M1 and I realized that some small changes were necessary to support Apple Silicon. This PR adds the required changes. I've been running binaries generated with this branch for some time now and they work without issues.
2 parents e37a13c + a1670aa commit 43fc1b3

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

compiler/rustc_target/src/spec/aarch64_apple_ios_macabi.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ use crate::spec::{Target, TargetOptions};
44
pub fn target() -> Target {
55
let base = opts("ios", Arch::Arm64_macabi);
66
Target {
7-
llvm_target: "arm64-apple-ios-macabi".to_string(),
7+
llvm_target: "arm64-apple-ios14.0-macabi".to_string(),
88
pointer_width: 64,
99
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".to_string(),
1010
arch: "aarch64".to_string(),
1111
options: TargetOptions {
12-
features: "+neon,+fp-armv8,+apple-a7".to_string(),
12+
features: "+neon,+fp-armv8,+apple-a12".to_string(),
1313
eliminate_frame_pointer: false,
1414
max_atomic_width: Some(128),
1515
unsupported_abis: super::arm_base::unsupported_abis(),
@@ -18,11 +18,9 @@ pub fn target() -> Target {
1818
// These arguments are not actually invoked - they just have
1919
// to look right to pass App Store validation.
2020
bitcode_llvm_cmdline: "-triple\0\
21-
arm64-apple-ios-macabi\0\
21+
arm64-apple-ios14.0-macabi\0\
2222
-emit-obj\0\
2323
-disable-llvm-passes\0\
24-
-target-abi\0\
25-
darwinpcs\0\
2624
-Os\0"
2725
.to_string(),
2826
..base

0 commit comments

Comments
 (0)