This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -12,11 +12,9 @@ fn main() {
1212 } else if target. contains ( "x86_64-fortanix-unknown-sgx" ) {
1313 llvm_libunwind:: compile ( ) ;
1414 } else if target. contains ( "linux" ) {
15+ // linking for Linux is handled in lib.rs
1516 if target. contains ( "musl" ) {
16- // linking for musl is handled in lib.rs
1717 llvm_libunwind:: compile ( ) ;
18- } else if !target. contains ( "android" ) {
19- println ! ( "cargo:rustc-link-lib=gcc_s" ) ;
2018 }
2119 } else if target. contains ( "freebsd" ) {
2220 println ! ( "cargo:rustc-link-lib=gcc_s" ) ;
Original file line number Diff line number Diff line change @@ -42,6 +42,10 @@ cfg_if::cfg_if! {
4242#[ link( name = "gcc_s" , cfg( not( target_feature = "crt-static" ) ) ) ]
4343extern "C" { }
4444
45+ #[ cfg( all( target_os = "linux" , target_env = "gnu" , not( feature = "llvm-libunwind" ) ) ) ]
46+ #[ link( name = "gcc_s" , cfg( not( target_feature = "crt-static" ) ) ) ]
47+ extern "C" { }
48+
4549#[ cfg( target_os = "redox" ) ]
4650#[ link( name = "gcc_eh" , kind = "static-nobundle" , cfg( target_feature = "crt-static" ) ) ]
4751#[ link( name = "gcc_s" , cfg( not( target_feature = "crt-static" ) ) ) ]
You can’t perform that action at this time.
0 commit comments