2 #![unstable(feature = "panic_unwind", issue = "32837")]
5 #![feature(staged_api)]
6 #![feature(unwind_attributes)]
7 #![feature(static_nobundle)]
8 #![cfg_attr(not(target_env = "msvc"), feature(libc))]
11 if #[cfg(target_env = "msvc")] {
12 // Windows MSVC no extra unwinder support needed
17 // These "unix" family members do not have unwinder.
18 // Note this also matches x86_64-linux-kernel.
23 all(target_vendor = "fortanix", target_env = "sgx"),
28 // no unwinder on the system!
29 // - wasm32 (not emscripten, which is "unix" family)
30 // - os=none ("bare metal" targets)
34 // - nvptx64-nvidia-cuda
35 // - Any new targets not listed above.
39 #[cfg(target_env = "musl")]
40 #[link(name = "unwind", kind = "static", cfg(target_feature = "crt-static"))]
41 #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
44 // When building with crt-static, we get `gcc_eh` from the `libc` crate, since
45 // glibc needs it, and needs it listed later on the linker command line. We
46 // don't want to duplicate it here.
50 not(feature = "llvm-libunwind"),
51 not(feature = "system-llvm-libunwind")
53 #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
59 not(feature = "llvm-libunwind"),
60 feature = "system-llvm-libunwind"
62 #[link(name = "unwind", cfg(not(target_feature = "crt-static")))]
65 #[cfg(target_os = "redox")]
66 #[link(name = "gcc_eh", kind = "static-nobundle", cfg(target_feature = "crt-static"))]
67 #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
70 #[cfg(all(target_vendor = "fortanix", target_env = "sgx"))]
71 #[link(name = "unwind", kind = "static-nobundle")]