2022-10-23 16:41:36 -05:00
|
|
|
use super::apple_base::{opts, Arch};
|
2022-08-06 21:08:46 +03:00
|
|
|
use crate::spec::{Cc, FramePointer, LinkerFlavor, Lld, Target, TargetOptions};
|
2020-10-03 14:46:58 +02:00
|
|
|
|
|
|
|
|
pub fn target() -> Target {
|
2023-01-26 23:29:08 -08:00
|
|
|
let llvm_target = "arm64-apple-ios-macabi";
|
2022-07-01 15:12:46 +00:00
|
|
|
|
2022-10-23 17:22:54 -05:00
|
|
|
let arch = Arch::Arm64_macabi;
|
|
|
|
|
let mut base = opts("ios", arch);
|
2022-08-06 21:08:46 +03:00
|
|
|
base.add_pre_link_args(LinkerFlavor::Darwin(Cc::Yes, Lld::No), &["-target", llvm_target]);
|
2022-07-01 15:12:46 +00:00
|
|
|
|
2020-10-03 14:46:58 +02:00
|
|
|
Target {
|
2022-07-01 15:12:46 +00:00
|
|
|
llvm_target: llvm_target.into(),
|
2020-10-03 14:46:58 +02:00
|
|
|
pointer_width: 64,
|
2022-03-22 11:43:05 +01:00
|
|
|
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".into(),
|
2022-10-23 17:22:54 -05:00
|
|
|
arch: arch.target_arch(),
|
2020-10-03 14:46:58 +02:00
|
|
|
options: TargetOptions {
|
2022-03-22 11:43:05 +01:00
|
|
|
features: "+neon,+fp-armv8,+apple-a12".into(),
|
2020-10-03 14:46:58 +02:00
|
|
|
max_atomic_width: Some(128),
|
|
|
|
|
forces_embed_bitcode: true,
|
2021-06-26 23:53:35 +03:00
|
|
|
frame_pointer: FramePointer::NonLeaf,
|
2020-10-03 14:46:58 +02:00
|
|
|
// 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\
|
2023-01-26 23:29:08 -08:00
|
|
|
arm64-apple-ios-macabi\0\
|
2020-10-03 14:46:58 +02:00
|
|
|
-emit-obj\0\
|
|
|
|
|
-disable-llvm-passes\0\
|
|
|
|
|
-Os\0"
|
2022-03-22 11:43:05 +01:00
|
|
|
.into(),
|
2022-07-01 15:12:46 +00:00
|
|
|
..base
|
2020-10-03 14:46:58 +02:00
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|