File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ fn main() {
16
16
17
17
if target. contains ( "linux" ) {
18
18
if target. contains ( "musl" ) && !target. contains ( "mips" ) {
19
- println ! ( "cargo:rustc-link- lib=static=unwind" ) ;
19
+ // musl is handled in lib.rs
20
20
} else if !target. contains ( "android" ) {
21
21
println ! ( "cargo:rustc-link-lib=gcc_s" ) ;
22
22
}
Original file line number Diff line number Diff line change 15
15
#![ deny( warnings) ]
16
16
17
17
#![ feature( cfg_target_vendor) ]
18
+ #![ feature( link_cfg) ]
18
19
#![ feature( staged_api) ]
19
20
#![ feature( unwind_attributes) ]
20
21
@@ -27,3 +28,8 @@ extern crate libc;
27
28
mod libunwind;
28
29
#[ cfg( not( target_env = "msvc" ) ) ]
29
30
pub use libunwind:: * ;
31
+
32
+ #[ cfg( target_env = "musl" ) ]
33
+ #[ link( name = "unwind" , kind = "static" , cfg( target_feature = "crt-static" ) ) ]
34
+ #[ link( name = "gcc_s" , cfg( not( target_feature = "crt-static" ) ) ) ]
35
+ extern { }
You can’t perform that action at this time.
0 commit comments