@@ -98,16 +98,26 @@ extern "C" {
98
98
pub fn _Unwind_Backtrace ( trace : _Unwind_Trace_Fn ,
99
99
trace_argument : * libc:: c_void )
100
100
-> _Unwind_Reason_Code ;
101
- #[ cfg( not( target_os = "android" ) ) ]
101
+ #[ cfg( stage0 , not( target_os = "android" ) ) ]
102
102
pub fn _Unwind_GetIP ( ctx : * _Unwind_Context ) -> libc:: uintptr_t ;
103
- #[ cfg( not( target_os = "android" ) ) ]
103
+ #[ cfg( stage0, not( target_os = "android" ) ) ]
104
+ pub fn _Unwind_FindEnclosingFunction ( pc : * libc:: c_void ) -> * libc:: c_void ;
105
+
106
+ #[ cfg( not( stage0) ,
107
+ not( target_os = "android" ) ,
108
+ not( target_os = "linux" , target_arch = "arm" ) ) ]
109
+ pub fn _Unwind_GetIP ( ctx : * _Unwind_Context ) -> libc:: uintptr_t ;
110
+ #[ cfg( not( stage0) ,
111
+ not( target_os = "android" ) ,
112
+ not( target_os = "linux" , target_arch = "arm" ) ) ]
104
113
pub fn _Unwind_FindEnclosingFunction ( pc : * libc:: c_void ) -> * libc:: c_void ;
105
114
}
106
115
107
116
// On android, the function _Unwind_GetIP is a macro, and this is the expansion
108
117
// of the macro. This is all copy/pasted directly from the header file with the
109
118
// definition of _Unwind_GetIP.
110
119
#[ cfg( target_os = "android" ) ]
120
+ #[ cfg( target_os = "linux" , target_os = "arm" ) ]
111
121
pub unsafe fn _Unwind_GetIP ( ctx : * _Unwind_Context ) -> libc:: uintptr_t {
112
122
#[ repr( C ) ]
113
123
enum _Unwind_VRS_Result {
@@ -151,6 +161,7 @@ pub unsafe fn _Unwind_GetIP(ctx: *_Unwind_Context) -> libc::uintptr_t {
151
161
152
162
// This function also doesn't exist on android, so make it a no-op
153
163
#[ cfg( target_os = "android" ) ]
164
+ #[ cfg( target_os = "linux" , target_os = "arm" ) ]
154
165
pub unsafe fn _Unwind_FindEnclosingFunction ( pc : * libc:: c_void ) -> * libc:: c_void {
155
166
pc
156
167
}
0 commit comments