Skip to content

Commit

Permalink
Auto merge of #75280 - overdrivenpotato:psp-unwind, r=dtolnay
Browse files Browse the repository at this point in the history
Add back unwinding support for Sony PSP

This PR adds back unwinding support for the Sony PSP. The `mipsel-sony-psp` target works well with unwinding. In [rust-psp], we use the `panic_unwind` crate along with LLVM's libunwind to catch panics, run destructors, and print them to the debug screen without aborting all threads.

[rust-psp]: https://github.com/overdrivenpotato/rust-psp
  • Loading branch information
bors committed Aug 9, 2020
2 parents aced185 + 27fca58 commit f50f1c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion library/panic_unwind/src/lib.rs
Expand Up @@ -50,6 +50,7 @@ cfg_if::cfg_if! {
} else if #[cfg(any(
all(target_family = "windows", target_env = "gnu"),
target_os = "cloudabi",
target_os = "psp",
target_family = "unix",
all(target_vendor = "fortanix", target_env = "sgx"),
))] {
Expand All @@ -65,7 +66,6 @@ cfg_if::cfg_if! {
// - os=uefi
// - nvptx64-nvidia-cuda
// - avr-unknown-unknown
// - mipsel-sony-psp
#[path = "dummy.rs"]
mod real_imp;
}
Expand Down
2 changes: 1 addition & 1 deletion library/unwind/src/lib.rs
Expand Up @@ -19,6 +19,7 @@ cfg_if::cfg_if! {
} else if #[cfg(any(
unix,
windows,
target_os = "psp",
target_os = "cloudabi",
all(target_vendor = "fortanix", target_env = "sgx"),
))] {
Expand All @@ -32,7 +33,6 @@ cfg_if::cfg_if! {
// - os=uefi
// - os=cuda
// - nvptx64-nvidia-cuda
// - mipsel-sony-psp
// - Any new targets not listed above.
}
}
Expand Down

0 comments on commit f50f1c8

Please sign in to comment.