@@ -99,39 +99,23 @@ pub type _Unwind_Exception_Cleanup_Fn =
9999 extern "C" fn ( unwind_code : _Unwind_Reason_Code ,
100100 exception : * mut _Unwind_Exception ) ;
101101
102- #[ cfg( any( all( target_os = "linux" , not( target_env = "musl" ) ) ,
103- target_os = "freebsd" ) ) ]
104- #[ link( name = "gcc_s" ) ]
105- extern { }
106-
107- #[ cfg( all( target_os = "linux" , target_env = "musl" , not( test) ) ) ]
108- #[ link( name = "unwind" , kind = "static" ) ]
109- extern { }
110-
111- #[ cfg( any( target_os = "android" , target_os = "openbsd" ) ) ]
112- #[ link( name = "gcc" ) ]
113- extern { }
114-
115- #[ cfg( all( target_os = "netbsd" , not( target_vendor = "rumprun" ) ) ) ]
116- #[ link( name = "gcc" ) ]
117- extern { }
118-
119- #[ cfg( all( target_os = "netbsd" , target_vendor = "rumprun" ) ) ]
120- #[ link( name = "unwind" ) ]
121- extern { }
122-
123- #[ cfg( target_os = "dragonfly" ) ]
124- #[ link( name = "gcc_pic" ) ]
125- extern { }
126-
127- #[ cfg( target_os = "bitrig" ) ]
128- #[ link( name = "c++abi" ) ]
129- extern { }
130-
131- #[ cfg( all( target_os = "windows" , target_env="gnu" ) ) ]
132- #[ link( name = "gcc_eh" ) ]
133- extern { }
134-
102+ #[ cfg_attr( any( all( target_os = "linux" , not( target_env = "musl" ) ) ,
103+ target_os = "freebsd" ) ,
104+ link( name = "gcc_s" ) ) ]
105+ #[ cfg_attr( all( target_os = "linux" , target_env = "musl" , not( test) ) ,
106+ link( name = "unwind" , kind = "static" ) ) ]
107+ #[ cfg_attr( any( target_os = "android" , target_os = "openbsd" ) ,
108+ link( name = "gcc" ) ) ]
109+ #[ cfg_attr( all( target_os = "netbsd" , not( target_vendor = "rumprun" ) ) ,
110+ link( name = "gcc" ) ) ]
111+ #[ cfg_attr( all( target_os = "netbsd" , target_vendor = "rumprun" ) ,
112+ link( name = "unwind" ) ) ]
113+ #[ cfg_attr( target_os = "dragonfly" ,
114+ link( name = "gcc_pic" ) ) ]
115+ #[ cfg_attr( target_os = "bitrig" ,
116+ link( name = "c++abi" ) ) ]
117+ #[ cfg_attr( all( target_os = "windows" , target_env="gnu" ) ,
118+ link( name = "gcc_eh" ) ) ]
135119extern "C" {
136120 // iOS on armv7 uses SjLj exceptions and requires to link
137121 // against corresponding routine (..._SjLj_...)
0 commit comments