Skip to content

Commit

Permalink
Merge pull request #80 from SK83RJOSH/master
Browse files Browse the repository at this point in the history
Add support for `mipsel-sony-psp`
  • Loading branch information
dtolnay authored Jan 7, 2024
2 parents ead7080 + 6bb41a2 commit ac0fe18
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
20 changes: 11 additions & 9 deletions impl/src/declaration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,27 +129,28 @@ pub fn expand(input: TokenStream) -> TokenStream {
target_os = "fuchsia",
target_os = "illumos",
target_os = "freebsd",
target_os = "psp",
))]
extern "Rust" {
#[cfg_attr(any(target_os = "none", target_os = "linux", target_os = "android", target_os = "fuchsia"), link_name = #linux_section_start)]
#[cfg_attr(any(target_os = "none", target_os = "linux", target_os = "android", target_os = "fuchsia", target_os = "psp"), link_name = #linux_section_start)]
#[cfg_attr(any(target_os = "macos", target_os = "ios", target_os = "tvos"), link_name = #macho_section_start)]
#[cfg_attr(target_os = "illumos", link_name = #illumos_section_start)]
#[cfg_attr(target_os = "freebsd", link_name = #freebsd_section_start)]
static LINKME_START: <#ty as #linkme_path::__private::Slice>::Element;

#[cfg_attr(any(target_os = "none", target_os = "linux", target_os = "android", target_os = "fuchsia"), link_name = #linux_section_stop)]
#[cfg_attr(any(target_os = "none", target_os = "linux", target_os = "android", target_os = "fuchsia", target_os = "psp"), link_name = #linux_section_stop)]
#[cfg_attr(any(target_os = "macos", target_os = "ios", target_os = "tvos"), link_name = #macho_section_stop)]
#[cfg_attr(target_os = "illumos", link_name = #illumos_section_stop)]
#[cfg_attr(target_os = "freebsd", link_name = #freebsd_section_stop)]
static LINKME_STOP: <#ty as #linkme_path::__private::Slice>::Element;

#[cfg_attr(any(target_os = "none", target_os = "linux", target_os = "android", target_os = "fuchsia"), link_name = #linux_dupcheck_start)]
#[cfg_attr(any(target_os = "none", target_os = "linux", target_os = "android", target_os = "fuchsia", target_os = "psp"), link_name = #linux_dupcheck_start)]
#[cfg_attr(any(target_os = "macos", target_os = "ios", target_os = "tvos"), link_name = #macho_dupcheck_start)]
#[cfg_attr(target_os = "illumos", link_name = #illumos_dupcheck_start)]
#[cfg_attr(target_os = "freebsd", link_name = #freebsd_dupcheck_start)]
static DUPCHECK_START: #linkme_path::__private::usize;

#[cfg_attr(any(target_os = "none", target_os = "linux", target_os = "android", target_os = "fuchsia"), link_name = #linux_dupcheck_stop)]
#[cfg_attr(any(target_os = "none", target_os = "linux", target_os = "android", target_os = "fuchsia", target_os = "psp"), link_name = #linux_dupcheck_stop)]
#[cfg_attr(any(target_os = "macos", target_os = "ios", target_os = "tvos"), link_name = #macho_dupcheck_stop)]
#[cfg_attr(target_os = "illumos", link_name = #illumos_dupcheck_stop)]
#[cfg_attr(target_os = "freebsd", link_name = #freebsd_dupcheck_stop)]
Expand All @@ -173,14 +174,14 @@ pub fn expand(input: TokenStream) -> TokenStream {
static DUPCHECK_STOP: () = ();

#used
#[cfg(any(target_os = "none", target_os = "linux", target_os = "android", target_os = "illumos", target_os = "freebsd"))]
#[cfg_attr(any(target_os = "none", target_os = "linux", target_os = "android", target_os = "fuchsia"), link_section = #linux_section)]
#[cfg(any(target_os = "none", target_os = "linux", target_os = "android", target_os = "illumos", target_os = "freebsd", target_os = "psp"))]
#[cfg_attr(any(target_os = "none", target_os = "linux", target_os = "android", target_os = "fuchsia", target_os = "psp"), link_section = #linux_section)]
#[cfg_attr(target_os = "illumos", link_section = #illumos_section)]
#[cfg_attr(target_os = "freebsd", link_section = #freebsd_section)]
static mut LINKME_PLEASE: [<#ty as #linkme_path::__private::Slice>::Element; 0] = [];

#used
#[cfg_attr(any(target_os = "none", target_os = "linux", target_os = "android", target_os = "fuchsia"), link_section = #linux_dupcheck)]
#[cfg_attr(any(target_os = "none", target_os = "linux", target_os = "android", target_os = "fuchsia", target_os = "psp"), link_section = #linux_dupcheck)]
#[cfg_attr(any(target_os = "macos", target_os = "ios", target_os = "tvos"), link_section = #macho_dupcheck)]
#[cfg_attr(target_os = "windows", link_section = #windows_dupcheck)]
#[cfg_attr(target_os = "illumos", link_section = #illumos_dupcheck)]
Expand All @@ -198,6 +199,7 @@ pub fn expand(input: TokenStream) -> TokenStream {
target_os = "fuchsia",
target_os = "illumos",
target_os = "freebsd",
target_os = "psp",
)))]
#unsupported_platform

Expand Down Expand Up @@ -242,7 +244,7 @@ pub fn expand(input: TokenStream) -> TokenStream {
$item:item
) => {
#used
#[cfg_attr(any(target_os = "none", target_os = "linux", target_os = "android", target_os = "fuchsia"), link_section = $linux_section)]
#[cfg_attr(any(target_os = "none", target_os = "linux", target_os = "android", target_os = "fuchsia", target_os = "psp"), link_section = $linux_section)]
#[cfg_attr(any(target_os = "macos", target_os = "ios", target_os = "tvos"), link_section = $macho_section)]
#[cfg_attr(target_os = "windows", link_section = $windows_section)]
#[cfg_attr(target_os = "illumos", link_section = $illumos_section)]
Expand All @@ -251,7 +253,7 @@ pub fn expand(input: TokenStream) -> TokenStream {
};
($item:item) => {
#used
#[cfg_attr(any(target_os = "none", target_os = "linux", target_os = "android", target_os = "fuchsia"), link_section = #linux_section)]
#[cfg_attr(any(target_os = "none", target_os = "linux", target_os = "android", target_os = "fuchsia", target_os = "psp"), link_section = #linux_section)]
#[cfg_attr(any(target_os = "macos", target_os = "ios", target_os = "tvos"), link_section = #macho_section)]
#[cfg_attr(target_os = "windows", link_section = #windows_section)]
#[cfg_attr(target_os = "illumos", link_section = #illumos_section)]
Expand Down
3 changes: 2 additions & 1 deletion src/distributed_slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ impl<T> DistributedSlice<[T]> {
target_os = "android",
target_os = "fuchsia",
target_os = "illumos",
target_os = "freebsd"
target_os = "freebsd",
target_os = "psp",
))]
pub const unsafe fn private_new(
name: &'static str,
Expand Down

0 comments on commit ac0fe18

Please sign in to comment.