|
| 1 | +// Generic ARM-v7 Cortex-A target, with hardware floating-point. |
| 2 | +// |
| 3 | +// Can be used in conjunction with the `target-feature` and |
| 4 | +// `target-cpu` compiler flags to opt-in more hardware-specific |
| 5 | +// features. |
| 6 | +// |
| 7 | +// For example, `-C target-cpu=cortex-a7`. |
| 8 | + |
| 9 | +use crate::spec::{LinkerFlavor, LldFlavor, PanicStrategy, Target, TargetOptions, TargetResult}; |
| 10 | + |
| 11 | +pub fn target() -> TargetResult { |
| 12 | + Ok(Target { |
| 13 | + llvm_target: "armv7a-none-eabihf".to_string(), |
| 14 | + target_endian: "little".to_string(), |
| 15 | + target_pointer_width: "32".to_string(), |
| 16 | + target_c_int_width: "32".to_string(), |
| 17 | + data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), |
| 18 | + arch: "arm".to_string(), |
| 19 | + target_os: "none".to_string(), |
| 20 | + target_env: String::new(), |
| 21 | + target_vendor: String::new(), |
| 22 | + linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), |
| 23 | + |
| 24 | + options: TargetOptions { |
| 25 | + features: "+strict-align,+v7,+vfp3,+d16,+thumb2,-neon".to_string(), |
| 26 | + linker: Some("rust-lld".to_owned()), |
| 27 | + executables: true, |
| 28 | + relocation_model: "static".to_string(), |
| 29 | + max_atomic_width: Some(64), |
| 30 | + panic_strategy: PanicStrategy::Abort, |
| 31 | + abi_blacklist: super::arm_base::abi_blacklist(), |
| 32 | + .. Default::default() |
| 33 | + }, |
| 34 | + }) |
| 35 | +} |
0 commit comments