allow using the system-wide llvm-libunwind as the unwinder
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
This commit is contained in:
@@ -45,10 +45,24 @@ extern "C" {}
|
||||
// When building with crt-static, we get `gcc_eh` from the `libc` crate, since
|
||||
// glibc needs it, and needs it listed later on the linker command line. We
|
||||
// don't want to duplicate it here.
|
||||
#[cfg(all(target_os = "linux", target_env = "gnu", not(feature = "llvm-libunwind")))]
|
||||
#[cfg(all(
|
||||
target_os = "linux",
|
||||
target_env = "gnu",
|
||||
not(feature = "llvm-libunwind"),
|
||||
not(feature = "system-llvm-libunwind")
|
||||
))]
|
||||
#[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
|
||||
extern "C" {}
|
||||
|
||||
#[cfg(all(
|
||||
target_os = "linux",
|
||||
target_env = "gnu",
|
||||
not(feature = "llvm-libunwind"),
|
||||
feature = "system-llvm-libunwind"
|
||||
))]
|
||||
#[link(name = "unwind", cfg(not(target_feature = "crt-static")))]
|
||||
extern "C" {}
|
||||
|
||||
#[cfg(target_os = "redox")]
|
||||
#[link(name = "gcc_eh", kind = "static-nobundle", cfg(target_feature = "crt-static"))]
|
||||
#[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
|
||||
|
||||
Reference in New Issue
Block a user