about summary refs log tree commit diff
path: root/library/panic_abort
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-09-19 07:38:20 +0000
committerbors <bors@rust-lang.org>2023-09-19 07:38:20 +0000
commitae9c330629f1fb03a636cb8af367fead024793db (patch)
tree2e52f6cebdbb4987bbe71df37ae3497d6f3d7826 /library/panic_abort
parentaf78bae565e85b9c5698ee909af0652674eca6d4 (diff)
parent6c32a64962f591e6fd4cab72f63555b157684323 (diff)
downloadrust-ae9c330629f1fb03a636cb8af367fead024793db.tar.gz
rust-ae9c330629f1fb03a636cb8af367fead024793db.zip
Auto merge of #104101 - betrusted-io:xous-libstd-initial, r=bjorn3
Add initial libstd support for Xous

This patchset adds some minimal support to the tier-3 target `riscv32imac-unknown-xous-elf`. The following features are supported:

* alloc
* thread creation and joining
* thread sleeping
* thread_local
* panic_abort
* mutex
* condvar
* stdout

Additionally, internal support for the various Xous primitives surrounding IPC have been added as part of the Xous FFI. These may be exposed as part of `std::os::xous::ffi` in the future, however for now they are not public.

This represents the minimum viable product. A future patchset will add support for networking and filesystem support.
Diffstat (limited to 'library/panic_abort')
-rw-r--r--library/panic_abort/src/lib.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/library/panic_abort/src/lib.rs b/library/panic_abort/src/lib.rs
index 02534491da9..0dc570b29db 100644
--- a/library/panic_abort/src/lib.rs
+++ b/library/panic_abort/src/lib.rs
@@ -43,7 +43,8 @@ pub unsafe fn __rust_start_panic(_payload: &mut dyn BoxMeUp) -> u32 {
                 libc::abort();
             }
         } else if #[cfg(any(target_os = "hermit",
-                            all(target_vendor = "fortanix", target_env = "sgx")
+                            all(target_vendor = "fortanix", target_env = "sgx"),
+                            target_os = "xous"
         ))] {
             unsafe fn abort() -> ! {
                 // call std::sys::abort_internal