|
| 1 | +use crate::spec::{LinkArgs, LinkerFlavor, PanicStrategy, RelocModel, Target, TargetOptions}; |
| 2 | +use crate::abi::Endian; |
| 3 | + |
| 4 | +/// A base target for PlayStation Vita devices using the VITASDK toolchain. |
| 5 | +/// |
| 6 | +/// Requires the VITASDK toolchain on the host system. |
| 7 | +
|
| 8 | +pub fn target() -> Target { |
| 9 | + let mut pre_link_args = LinkArgs::new(); |
| 10 | + pre_link_args.insert( |
| 11 | + LinkerFlavor::Gcc, |
| 12 | + vec![ |
| 13 | + "-Wl,-q".to_string(), |
| 14 | + ], |
| 15 | + ); |
| 16 | + |
| 17 | + Target { |
| 18 | + llvm_target: "armv7a-vita-eabihf".to_string(), |
| 19 | + pointer_width: 32, |
| 20 | + data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), |
| 21 | + arch: "arm".to_string(), |
| 22 | + |
| 23 | + options: TargetOptions { |
| 24 | + os: "vita".to_string(), |
| 25 | + endian: Endian::Little, |
| 26 | + c_int_width: "32".to_string(), |
| 27 | + dynamic_linking: false, |
| 28 | + env: "newlib".to_string(), |
| 29 | + vendor: "sony".to_string(), |
| 30 | + abi: "eabihf".to_string(), |
| 31 | + linker_flavor: LinkerFlavor::Gcc, |
| 32 | + linker_is_gnu: true, |
| 33 | + no_default_libraries: false, |
| 34 | + cpu: "cortex-a9".to_string(), |
| 35 | + executables: true, |
| 36 | + families: vec!["unix".to_string()], |
| 37 | + linker: Some("arm-vita-eabi-gcc".to_string()), |
| 38 | + relocation_model: RelocModel::Static, |
| 39 | + features: "+v7,+neon".to_string(), |
| 40 | + pre_link_args, |
| 41 | + exe_suffix: ".elf".to_string(), |
| 42 | + panic_strategy: PanicStrategy::Abort, |
| 43 | + max_atomic_width: Some(32), |
| 44 | + ..Default::default() |
| 45 | + }, |
| 46 | + } |
| 47 | +} |
0 commit comments