mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-26 14:43:24 +00:00
added aarch64_apple_ios_sim as a rustc target
This commit is contained in:
parent
e708cbd91c
commit
f10fbbbd53
@ -2187,6 +2187,7 @@ fn add_apple_sdk(cmd: &mut dyn Linker, sess: &Session, flavor: LinkerFlavor) {
|
||||
("x86_64", "tvos") => "appletvsimulator",
|
||||
("arm", "ios") => "iphoneos",
|
||||
("aarch64", "ios") if llvm_target.contains("macabi") => "macosx",
|
||||
("aarch64", "ios") if llvm_target.contains("sim") => "iphonesimulator",
|
||||
("aarch64", "ios") => "iphoneos",
|
||||
("x86", "ios") => "iphonesimulator",
|
||||
("x86_64", "ios") if llvm_target.contains("macabi") => "macosx",
|
||||
|
31
compiler/rustc_target/src/spec/aarch64_apple_ios_sim.rs
Normal file
31
compiler/rustc_target/src/spec/aarch64_apple_ios_sim.rs
Normal file
@ -0,0 +1,31 @@
|
||||
use super::apple_sdk_base::{opts, Arch};
|
||||
use crate::spec::{Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
let base = opts("ios", Arch::Arm64_sim);
|
||||
Target {
|
||||
llvm_target: "arm64-apple-ios-simulator".to_string(),
|
||||
pointer_width: 64,
|
||||
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".to_string(),
|
||||
arch: "aarch64".to_string(),
|
||||
options: TargetOptions {
|
||||
features: "+neon,+fp-armv8,+apple-a7".to_string(),
|
||||
eliminate_frame_pointer: false,
|
||||
max_atomic_width: Some(128),
|
||||
unsupported_abis: super::arm_base::unsupported_abis(),
|
||||
forces_embed_bitcode: true,
|
||||
// Taken from a clang build on Xcode 11.4.1.
|
||||
// These arguments are not actually invoked - they just have
|
||||
// to look right to pass App Store validation.
|
||||
bitcode_llvm_cmdline: "-triple\0\
|
||||
arm64-apple-ios14.0-simulator\0\
|
||||
-emit-obj\0\
|
||||
-disable-llvm-passes\0\
|
||||
-target-abi\0\
|
||||
darwinpcs\0\
|
||||
-Os\0"
|
||||
.to_string(),
|
||||
..base
|
||||
},
|
||||
}
|
||||
}
|
@ -11,6 +11,7 @@ pub enum Arch {
|
||||
X86_64,
|
||||
X86_64_macabi,
|
||||
Arm64_macabi,
|
||||
Arm64_sim,
|
||||
}
|
||||
|
||||
fn target_cpu(arch: Arch) -> String {
|
||||
@ -22,13 +23,16 @@ fn target_cpu(arch: Arch) -> String {
|
||||
X86_64 => "core2",
|
||||
X86_64_macabi => "core2",
|
||||
Arm64_macabi => "apple-a12",
|
||||
Arm64_sim => "apple-a12",
|
||||
}
|
||||
.to_string()
|
||||
}
|
||||
|
||||
fn link_env_remove(arch: Arch) -> Vec<String> {
|
||||
match arch {
|
||||
Armv7 | Armv7s | Arm64 | I386 | X86_64 => vec!["MACOSX_DEPLOYMENT_TARGET".to_string()],
|
||||
Armv7 | Armv7s | Arm64 | I386 | X86_64 | Arm64_sim => {
|
||||
vec!["MACOSX_DEPLOYMENT_TARGET".to_string()]
|
||||
}
|
||||
X86_64_macabi | Arm64_macabi => vec!["IPHONEOS_DEPLOYMENT_TARGET".to_string()],
|
||||
}
|
||||
}
|
||||
|
@ -727,6 +727,7 @@ supported_targets! {
|
||||
("armv7s-apple-ios", armv7s_apple_ios),
|
||||
("x86_64-apple-ios-macabi", x86_64_apple_ios_macabi),
|
||||
("aarch64-apple-ios-macabi", aarch64_apple_ios_macabi),
|
||||
("aarch64-apple-ios-sim", aarch64_apple_ios_sim),
|
||||
("aarch64-apple-tvos", aarch64_apple_tvos),
|
||||
("x86_64-apple-tvos", x86_64_apple_tvos),
|
||||
|
||||
|
@ -153,6 +153,7 @@ not available.
|
||||
target | std | host | notes
|
||||
-------|-----|------|-------
|
||||
`aarch64-apple-ios-macabi` | ? | | Apple Catalyst on ARM64
|
||||
`aarch64-apple-ios-sim` | ? | | Apple iOS Simulator on ARM64
|
||||
`aarch64-apple-tvos` | * | | ARM64 tvOS
|
||||
`aarch64-unknown-freebsd` | ✓ | ✓ | ARM64 FreeBSD
|
||||
`aarch64-unknown-hermit` | ? | |
|
||||
|
Loading…
Reference in New Issue
Block a user