File tree Expand file tree Collapse file tree 2 files changed +24
-24
lines changed Expand file tree Collapse file tree 2 files changed +24
-24
lines changed Original file line number Diff line number Diff line change @@ -21,29 +21,5 @@ fn main() {
2121 if has_unwind {
2222 println ! ( "cargo:rustc-cfg=feature=\" system-llvm-libunwind\" " ) ;
2323 }
24- } else if target. contains ( "freebsd" ) {
25- println ! ( "cargo:rustc-link-lib=gcc_s" ) ;
26- } else if target. contains ( "netbsd" ) {
27- println ! ( "cargo:rustc-link-lib=gcc_s" ) ;
28- } else if target. contains ( "openbsd" ) {
29- if target. contains ( "sparc64" ) {
30- println ! ( "cargo:rustc-link-lib=gcc" ) ;
31- } else {
32- println ! ( "cargo:rustc-link-lib=c++abi" ) ;
33- }
34- } else if target. contains ( "solaris" ) {
35- println ! ( "cargo:rustc-link-lib=gcc_s" ) ;
36- } else if target. contains ( "illumos" ) {
37- println ! ( "cargo:rustc-link-lib=gcc_s" ) ;
38- } else if target. contains ( "dragonfly" ) {
39- println ! ( "cargo:rustc-link-lib=gcc_pic" ) ;
40- } else if target. ends_with ( "pc-windows-gnu" ) {
41- // This is handled in the target spec with late_link_args_[static|dynamic]
42- } else if target. contains ( "uwp-windows-gnu" ) {
43- println ! ( "cargo:rustc-link-lib=unwind" ) ;
44- } else if target. contains ( "haiku" ) {
45- println ! ( "cargo:rustc-link-lib=gcc_s" ) ;
46- } else if target. contains ( "redox" ) {
47- // redox is handled in lib.rs
4824 }
4925}
Original file line number Diff line number Diff line change @@ -103,3 +103,27 @@ extern "C" {}
103103#[ cfg( all( target_vendor = "fortanix" , target_env = "sgx" ) ) ]
104104#[ link( name = "unwind" , kind = "static" , modifiers = "-bundle" ) ]
105105extern "C" { }
106+
107+ #[ cfg( any( target_os = "freebsd" , target_os = "netbsd" ) ) ]
108+ #[ link( name = "gcc_s" ) ]
109+ extern "C" { }
110+
111+ #[ cfg( all( target_os = "openbsd" , target_arch = "sparc64" ) ) ]
112+ #[ link( name = "gcc" ) ]
113+ extern "C" { }
114+
115+ #[ cfg( all( target_os = "openbsd" , not( target_arch = "sparc64" ) ) ) ]
116+ #[ link( name = "c++abi" ) ]
117+ extern "C" { }
118+
119+ #[ cfg( any( target_os = "solaris" , target_os = "illumos" ) ) ]
120+ #[ link( name = "gcc_s" ) ]
121+ extern "C" { }
122+
123+ #[ cfg( target_os = "dragonfly" ) ]
124+ #[ link( name = "gcc_pic" ) ]
125+ extern "C" { }
126+
127+ #[ cfg( target_os = "haiku" ) ]
128+ #[ link( name = "gcc_s" ) ]
129+ extern "C" { }
You can’t perform that action at this time.
0 commit comments