2022-08-06 21:08:46 +03:00
|
|
|
use crate::spec::{Cc, LinkerFlavor, Lld, Target, TargetOptions};
|
2018-06-04 11:44:30 +03:00
|
|
|
|
|
|
|
|
// This target if is for the Android v7a ABI in thumb mode with
|
|
|
|
|
// NEON unconditionally enabled and, therefore, with 32 FPU registers
|
|
|
|
|
// enabled as well. See section A2.6.2 on page A2-56 in
|
|
|
|
|
// https://static.docs.arm.com/ddi0406/cd/DDI0406C_d_armv7ar_arm.pdf
|
|
|
|
|
|
|
|
|
|
// See https://developer.android.com/ndk/guides/abis.html#v7a
|
|
|
|
|
// for target ABI requirements.
|
|
|
|
|
|
2020-10-05 15:37:55 +03:00
|
|
|
pub fn target() -> Target {
|
2018-06-04 11:44:30 +03:00
|
|
|
let mut base = super::android_base::opts();
|
2022-08-06 21:08:46 +03:00
|
|
|
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-march=armv7-a"]);
|
2020-10-05 15:37:55 +03:00
|
|
|
Target {
|
2022-03-22 11:43:05 +01:00
|
|
|
llvm_target: "armv7-none-linux-android".into(),
|
2020-10-14 18:08:12 +02:00
|
|
|
pointer_width: 32,
|
2022-03-22 11:43:05 +01:00
|
|
|
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
|
|
|
|
|
arch: "arm".into(),
|
2021-06-11 14:22:13 +03:00
|
|
|
options: TargetOptions {
|
2022-03-22 11:43:05 +01:00
|
|
|
abi: "eabi".into(),
|
|
|
|
|
features: "+v7,+thumb-mode,+thumb2,+vfp3,+neon".into(),
|
2021-06-11 14:22:13 +03:00
|
|
|
max_atomic_width: Some(64),
|
|
|
|
|
..base
|
|
|
|
|
},
|
2020-10-05 15:37:55 +03:00
|
|
|
}
|
2018-06-04 11:44:30 +03:00
|
|
|
}
|