]>
Commit | Line | Data |
---|---|---|
3c0e092e | 1 | use crate::spec::{LinkArgs, LinkerFlavor, RelocModel, Target, TargetOptions}; |
c295e0f8 XL |
2 | |
3 | /// A base target for Nintendo 3DS devices using the devkitARM toolchain. | |
4 | /// | |
5 | /// Requires the devkitARM toolchain for 3DS targets on the host system. | |
6 | ||
7 | pub fn target() -> Target { | |
8 | let mut pre_link_args = LinkArgs::new(); | |
9 | pre_link_args.insert( | |
10 | LinkerFlavor::Gcc, | |
11 | vec![ | |
12 | "-specs=3dsx.specs".to_string(), | |
13 | "-mtune=mpcore".to_string(), | |
14 | "-mfloat-abi=hard".to_string(), | |
15 | "-mtp=soft".to_string(), | |
16 | ], | |
17 | ); | |
18 | ||
19 | Target { | |
20 | llvm_target: "armv6k-none-eabihf".to_string(), | |
21 | pointer_width: 32, | |
22 | data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), | |
23 | arch: "arm".to_string(), | |
24 | ||
25 | options: TargetOptions { | |
26 | os: "horizon".to_string(), | |
27 | env: "newlib".to_string(), | |
28 | vendor: "nintendo".to_string(), | |
29 | abi: "eabihf".to_string(), | |
30 | linker_flavor: LinkerFlavor::Gcc, | |
31 | cpu: "mpcore".to_string(), | |
32 | executables: true, | |
33 | families: vec!["unix".to_string()], | |
34 | linker: Some("arm-none-eabi-gcc".to_string()), | |
35 | relocation_model: RelocModel::Static, | |
36 | features: "+vfp2".to_string(), | |
37 | pre_link_args, | |
38 | exe_suffix: ".elf".to_string(), | |
5099ac24 | 39 | no_default_libraries: false, |
c295e0f8 XL |
40 | ..Default::default() |
41 | }, | |
42 | } | |
43 | } |