@@ -101,16 +101,26 @@ extern "C" {
101101 pub fn _Unwind_Backtrace ( trace : _Unwind_Trace_Fn ,
102102 trace_argument : * libc:: c_void )
103103 -> _Unwind_Reason_Code ;
104- #[ cfg( not( target_os = "android" ) ) ]
104+ #[ cfg( stage0 , not( target_os = "android" ) ) ]
105105 pub fn _Unwind_GetIP ( ctx : * _Unwind_Context ) -> libc:: uintptr_t ;
106- #[ cfg( not( target_os = "android" ) ) ]
106+ #[ cfg( stage0, not( target_os = "android" ) ) ]
107+ pub fn _Unwind_FindEnclosingFunction ( pc : * libc:: c_void ) -> * libc:: c_void ;
108+
109+ #[ cfg( not( stage0) ,
110+ not( target_os = "android" ) ,
111+ not( target_os = "linux" , target_arch = "arm" ) ) ]
112+ pub fn _Unwind_GetIP ( ctx : * _Unwind_Context ) -> libc:: uintptr_t ;
113+ #[ cfg( not( stage0) ,
114+ not( target_os = "android" ) ,
115+ not( target_os = "linux" , target_arch = "arm" ) ) ]
107116 pub fn _Unwind_FindEnclosingFunction ( pc : * libc:: c_void ) -> * libc:: c_void ;
108117}
109118
110119// On android, the function _Unwind_GetIP is a macro, and this is the expansion
111120// of the macro. This is all copy/pasted directly from the header file with the
112121// definition of _Unwind_GetIP.
113122#[ cfg( target_os = "android" ) ]
123+ #[ cfg( target_os = "linux" , target_os = "arm" ) ]
114124pub unsafe fn _Unwind_GetIP ( ctx : * _Unwind_Context ) -> libc:: uintptr_t {
115125 #[ repr( C ) ]
116126 enum _Unwind_VRS_Result {
@@ -154,6 +164,7 @@ pub unsafe fn _Unwind_GetIP(ctx: *_Unwind_Context) -> libc::uintptr_t {
154164
155165// This function also doesn't exist on android, so make it a no-op
156166#[ cfg( target_os = "android" ) ]
167+ #[ cfg( target_os = "linux" , target_os = "arm" ) ]
157168pub unsafe fn _Unwind_FindEnclosingFunction ( pc : * libc:: c_void ) -> * libc:: c_void {
158169 pc
159170}
0 commit comments