forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
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 rust-lang#72222 - Dylan-DPC:rollup-vaw44dg, r=Dylan-DPC
Rollup of 7 pull requests Successful merges: - rust-lang#71809 (Use `LocalDefId` in `DumpVisitor::nest_tables`) - rust-lang#72062 (Add built in PSP target) - rust-lang#72146 (Provide separate option for std debug asserts) - rust-lang#72172 (Forbid stage arguments to check) - rust-lang#72173 (Make intra links work inside trait impl block) - rust-lang#72200 (Add prioritize_on attribute to triagebot) - rust-lang#72214 (Minor fixes to comments) Failed merges: r? @ghost
- Loading branch information
Showing
16 changed files
with
280 additions
and
52 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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
use crate::spec::{LinkArgs, LinkerFlavor, LldFlavor, RelocModel}; | ||
use crate::spec::{Target, TargetOptions, TargetResult}; | ||
|
||
// The PSP has custom linker requirements. | ||
const LINKER_SCRIPT: &str = include_str!("./mipsel_sony_psp_linker_script.ld"); | ||
|
||
pub fn target() -> TargetResult { | ||
let mut pre_link_args = LinkArgs::new(); | ||
pre_link_args.insert( | ||
LinkerFlavor::Lld(LldFlavor::Ld), | ||
vec!["--eh-frame-hdr".to_string(), "--emit-relocs".to_string()], | ||
); | ||
|
||
Ok(Target { | ||
llvm_target: "mipsel-sony-psp".to_string(), | ||
target_endian: "little".to_string(), | ||
target_pointer_width: "32".to_string(), | ||
target_c_int_width: "32".to_string(), | ||
data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), | ||
arch: "mips".to_string(), | ||
target_os: "psp".to_string(), | ||
target_env: "".to_string(), | ||
target_vendor: "sony".to_string(), | ||
linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), | ||
|
||
options: TargetOptions { | ||
cpu: "mips2".to_string(), | ||
executables: true, | ||
linker: Some("rust-lld".to_owned()), | ||
linker_is_gnu: true, | ||
relocation_model: RelocModel::Static, | ||
|
||
// PSP FPU only supports single precision floats. | ||
features: "+single-float".to_string(), | ||
|
||
// PSP does not support trap-on-condition instructions. | ||
llvm_args: vec!["-mno-check-zero-division".to_string()], | ||
pre_link_args, | ||
link_script: Some(LINKER_SCRIPT.to_string()), | ||
..Default::default() | ||
}, | ||
}) | ||
} |
Oops, something went wrong.