Skip to content

Commit 48a0f3a

Browse files
authored
Rollup merge of rust-lang#47190 - EdSchouten:cloudabi-libpanic, r=alexcrichton
Port libpanic_abort and libpanic_unwind to CloudABI This change ports both the libpanic* libraries to CloudABI. The most interesting part of this pull request, however, is that it imports the CloudABI system call API into the Rust tree through a Git submodule. These will also be used by my port of libstd to CloudABI extensively, as that library obviously needs to invoke system calls to implement its primitives. I have taken the same approach as libc: `src/libcloudabi` + `src/rustc/cloudabi_shim`. If some other naming scheme is preferred, feel free to let me know! As `libcloudabi` is pretty small, maybe it makes sense to copy, instead of using a submodule?
2 parents b63f897 + 91611fc commit 48a0f3a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/libpanic_abort/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ pub unsafe extern fn __rust_maybe_catch_panic(f: fn(*mut u8),
5353
pub unsafe extern fn __rust_start_panic(_data: usize, _vtable: usize) -> u32 {
5454
abort();
5555

56-
#[cfg(unix)]
56+
#[cfg(any(unix, target_os = "cloudabi"))]
5757
unsafe fn abort() -> ! {
5858
extern crate libc;
5959
libc::abort();

src/libpanic_unwind/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ mod imp;
6868

6969
// i686-pc-windows-gnu and all others
7070
#[cfg(any(all(unix, not(target_os = "emscripten")),
71+
target_os = "cloudabi",
7172
target_os = "redox",
7273
all(windows, target_arch = "x86", target_env = "gnu")))]
7374
#[path = "gcc.rs"]

0 commit comments

Comments
 (0)