-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #88529 - Meziu:master, r=nagisa
ARMv6K Nintendo 3DS Tier 3 target added Addition of the target specifications to build .elf files for Nintendo 3DS (ARMv6K, Horizon). Requires devkitARM 3DS toolkit for system libraries and arm-none-eabi-gcc linker.
- Loading branch information
Showing
3 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
use crate::spec::{LinkArgs, LinkerFlavor, PanicStrategy, RelocModel, Target, TargetOptions}; | ||
|
||
/// A base target for Nintendo 3DS devices using the devkitARM toolchain. | ||
/// | ||
/// Requires the devkitARM toolchain for 3DS targets on the host system. | ||
|
||
pub fn target() -> Target { | ||
let mut pre_link_args = LinkArgs::new(); | ||
pre_link_args.insert( | ||
LinkerFlavor::Gcc, | ||
vec![ | ||
"-specs=3dsx.specs".to_string(), | ||
"-mtune=mpcore".to_string(), | ||
"-mfloat-abi=hard".to_string(), | ||
"-mtp=soft".to_string(), | ||
], | ||
); | ||
|
||
Target { | ||
llvm_target: "armv6k-none-eabihf".to_string(), | ||
pointer_width: 32, | ||
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), | ||
arch: "arm".to_string(), | ||
|
||
options: TargetOptions { | ||
os: "horizon".to_string(), | ||
env: "newlib".to_string(), | ||
vendor: "nintendo".to_string(), | ||
abi: "eabihf".to_string(), | ||
linker_flavor: LinkerFlavor::Gcc, | ||
cpu: "mpcore".to_string(), | ||
executables: true, | ||
families: vec!["unix".to_string()], | ||
linker: Some("arm-none-eabi-gcc".to_string()), | ||
relocation_model: RelocModel::Static, | ||
features: "+vfp2".to_string(), | ||
pre_link_args, | ||
exe_suffix: ".elf".to_string(), | ||
panic_strategy: PanicStrategy::Abort, | ||
..Default::default() | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61a1029
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious: What is missing in
lld
?