diff options
| author | kennytm <kennytm@gmail.com> | 2018-01-07 02:36:03 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-01-07 02:36:03 +0800 |
| commit | 48a0f3a5cae175854df7389bd33209d2adca1f94 (patch) | |
| tree | ae64dfc9fab9e1c54ad879fc881f6ccddf58e3f3 | |
| parent | b63f89783d2e91950e9fe46580f1cc6b06109739 (diff) | |
| parent | 91611fc3d0ee8a7a0a7accff4377e3a21fd7b6c4 (diff) | |
| download | rust-48a0f3a5cae175854df7389bd33209d2adca1f94.tar.gz rust-48a0f3a5cae175854df7389bd33209d2adca1f94.zip | |
Rollup merge of #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?
| -rw-r--r-- | src/libpanic_abort/lib.rs | 2 | ||||
| -rw-r--r-- | src/libpanic_unwind/lib.rs | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/libpanic_abort/lib.rs b/src/libpanic_abort/lib.rs index 29a9e1aadaf..c3bd6a2bc18 100644 --- a/src/libpanic_abort/lib.rs +++ b/src/libpanic_abort/lib.rs @@ -53,7 +53,7 @@ pub unsafe extern fn __rust_maybe_catch_panic(f: fn(*mut u8), pub unsafe extern fn __rust_start_panic(_data: usize, _vtable: usize) -> u32 { abort(); - #[cfg(unix)] + #[cfg(any(unix, target_os = "cloudabi"))] unsafe fn abort() -> ! { extern crate libc; libc::abort(); diff --git a/src/libpanic_unwind/lib.rs b/src/libpanic_unwind/lib.rs index 6b8da7a51ce..92e40e8f26d 100644 --- a/src/libpanic_unwind/lib.rs +++ b/src/libpanic_unwind/lib.rs @@ -68,6 +68,7 @@ mod imp; // i686-pc-windows-gnu and all others #[cfg(any(all(unix, not(target_os = "emscripten")), + target_os = "cloudabi", target_os = "redox", all(windows, target_arch = "x86", target_env = "gnu")))] #[path = "gcc.rs"] |
