Skip to content

Commit

Permalink
Add comment explaining why libunwind doesn't need to link libgcc_eh
Browse files Browse the repository at this point in the history
  • Loading branch information
joshtriplett committed Oct 5, 2020
1 parent a3944a0 commit d9f29fd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions library/unwind/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ cfg_if::cfg_if! {
#[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
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")))]
#[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
extern "C" {}
Expand Down

0 comments on commit d9f29fd

Please sign in to comment.