mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-17 05:25:37 +03:00
8eb7f36a3b
This is duplicated in a few locations throughout the sysroot to work around issues with not exporting a macro in libstd but still wanting it available to sysroot crates to define blocks. Nowadays though we can simply depend on the `cfg-if` crate on crates.io, allowing us to use it from there!
29 lines
751 B
Rust
29 lines
751 B
Rust
#![no_std]
|
|
#![unstable(feature = "panic_unwind", issue = "32837")]
|
|
|
|
#![deny(rust_2018_idioms)]
|
|
|
|
#![feature(link_cfg)]
|
|
#![feature(nll)]
|
|
#![feature(staged_api)]
|
|
#![feature(unwind_attributes)]
|
|
#![feature(static_nobundle)]
|
|
|
|
#![cfg_attr(not(target_env = "msvc"), feature(libc))]
|
|
|
|
cfg_if::cfg_if! {
|
|
if #[cfg(target_env = "msvc")] {
|
|
// no extra unwinder support needed
|
|
} else if #[cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))] {
|
|
// no unwinder on the system!
|
|
} else {
|
|
mod libunwind;
|
|
pub use libunwind::*;
|
|
}
|
|
}
|
|
|
|
#[cfg(target_env = "musl")]
|
|
#[link(name = "unwind", kind = "static", cfg(target_feature = "crt-static"))]
|
|
#[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
|
|
extern {}
|