diff options
| author | Lokathor <zefria@gmail.com> | 2020-07-16 07:05:08 -0600 |
|---|---|---|
| committer | Lokathor <zefria@gmail.com> | 2020-07-16 07:05:08 -0600 |
| commit | 48ec236c8c7c5a32077c465eb254646a9860f802 (patch) | |
| tree | be17da069754f128d75f5063bb7943b2ae4e323f | |
| parent | 7e11379f3b4c376fbb9a6c4d44f3286ccc28d149 (diff) | |
| download | rust-48ec236c8c7c5a32077c465eb254646a9860f802.tar.gz rust-48ec236c8c7c5a32077c465eb254646a9860f802.zip | |
start GBA file.
| -rw-r--r-- | src/librustc_target/spec/thumbv4t_nintendo_gba.rs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/librustc_target/spec/thumbv4t_nintendo_gba.rs b/src/librustc_target/spec/thumbv4t_nintendo_gba.rs new file mode 100644 index 00000000000..b7e70167c0d --- /dev/null +++ b/src/librustc_target/spec/thumbv4t_nintendo_gba.rs @@ -0,0 +1,30 @@ +//! Targets the Nintendo Game Boy Advance (GBA). +//! +//! The GBA is a handheld game device from 2001. Inside, the CPU is an ARM7TDMI. +//! That's in the ARMv4T architecture family. +//! +//! Technically the device has no OS, however we're going to copy the +//! `mipsel_sony_psp` target setup and set the OS string to be "GBA". Other than +//! the setting of the `target_os` and `target_vendor` values, this target is a +//! fairly standard configuration for `thumbv4t` + +use crate::spec::{LinkerFlavor, LldFlavor, Target, TargetOptions, TargetResult}; + +pub fn target() -> TargetResult { + Ok(Target { + llvm_target: "thumbv4t-none-eabi".to_string(), + target_endian: "little".to_string(), + target_pointer_width: "32".to_string(), + target_c_int_width: "32".to_string(), + target_os: "gba".to_string(), + target_env: String::new(), + target_vendor: "nintendo".to_string(), + arch: "arm".to_string(), + data_layout: "TODO".to_string(), + linker_flavor: LinkerFlavor::Ld, + options: TargetOptions { + // TODO + ..TargetOptions::default() + }, + }) +} |
