]> git.lizzy.rs Git - rust.git/blob - src/libunwind/lib.rs
Add x86_64-fortanix-unknown-sgx target to libstd and dependencies
[rust.git] / src / libunwind / lib.rs
1 // Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 #![no_std]
12 #![unstable(feature = "panic_unwind", issue = "32837")]
13
14 #![feature(cfg_target_vendor)]
15 #![feature(link_cfg)]
16 #![feature(nll)]
17 #![feature(staged_api)]
18 #![feature(unwind_attributes)]
19 #![feature(static_nobundle)]
20
21 #![cfg_attr(not(target_env = "msvc"), feature(libc))]
22
23 #[macro_use]
24 mod macros;
25
26 cfg_if! {
27     if #[cfg(target_env = "msvc")] {
28         // no extra unwinder support needed
29     } else if #[cfg(any(
30         all(target_arch = "wasm32", not(target_os = "emscripten")),
31         target_env = "sgx"
32     ))] {
33         // no unwinder on the system!
34     } else {
35         extern crate libc;
36         mod libunwind;
37         pub use libunwind::*;
38     }
39 }
40
41 #[cfg(target_env = "musl")]
42 #[link(name = "unwind", kind = "static", cfg(target_feature = "crt-static"))]
43 #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
44 extern {}