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