Skip to content

Commit d9f29fd

Browse files
committed
Add comment explaining why libunwind doesn't need to link libgcc_eh
1 parent a3944a0 commit d9f29fd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

library/unwind/src/lib.rs

+3
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ cfg_if::cfg_if! {
4242
#[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
4343
extern "C" {}
4444

45+
// When building with crt-static, we get `gcc_eh` from the `libc` crate, since
46+
// glibc needs it, and needs it listed later on the linker command line. We
47+
// don't want to duplicate it here.
4548
#[cfg(all(target_os = "linux", target_env = "gnu", not(feature = "llvm-libunwind")))]
4649
#[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
4750
extern "C" {}

0 commit comments

Comments
 (0)