X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibunwind%2Flib.rs;h=461b49aa363b4406716d1f2af76bb3e2a98abf4a;hb=eb8f2586ebd842dec49d3d7f50e49a985ab31493;hp=d4d52322adab0e5955b8ab98d1210e060337c64a;hpb=83e22b8b24c15f7a4b97b62cd53c139e6bb0cb23;p=rust.git diff --git a/src/libunwind/lib.rs b/src/libunwind/lib.rs index d4d52322ada..461b49aa363 100644 --- a/src/libunwind/lib.rs +++ b/src/libunwind/lib.rs @@ -9,12 +9,11 @@ // except according to those terms. #![no_std] -#![crate_name = "unwind"] -#![crate_type = "rlib"] #![unstable(feature = "panic_unwind", issue = "32837")] #![deny(warnings)] #![feature(cfg_target_vendor)] +#![feature(link_cfg)] #![feature(staged_api)] #![feature(unwind_attributes)] #![feature(static_nobundle)] @@ -28,3 +27,8 @@ mod libunwind; #[cfg(not(target_env = "msvc"))] pub use libunwind::*; + +#[cfg(all(target_env = "musl", not(target_arch = "mips")))] +#[link(name = "unwind", kind = "static", cfg(target_feature = "crt-static"))] +#[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))] +extern {}