File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -12,11 +12,9 @@ fn main() {
12
12
} else if target. contains ( "x86_64-fortanix-unknown-sgx" ) {
13
13
llvm_libunwind:: compile ( ) ;
14
14
} else if target. contains ( "linux" ) {
15
+ // linking for Linux is handled in lib.rs
15
16
if target. contains ( "musl" ) {
16
- // linking for musl is handled in lib.rs
17
17
llvm_libunwind:: compile ( ) ;
18
- } else if !target. contains ( "android" ) {
19
- println ! ( "cargo:rustc-link-lib=gcc_s" ) ;
20
18
}
21
19
} else if target. contains ( "freebsd" ) {
22
20
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! {
42
42
#[ link( name = "gcc_s" , cfg( not( target_feature = "crt-static" ) ) ) ]
43
43
extern "C" { }
44
44
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
+
45
49
#[ cfg( target_os = "redox" ) ]
46
50
#[ link( name = "gcc_eh" , kind = "static-nobundle" , cfg( target_feature = "crt-static" ) ) ]
47
51
#[ link( name = "gcc_s" , cfg( not( target_feature = "crt-static" ) ) ) ]
You can’t perform that action at this time.
0 commit comments