File tree Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -521,7 +521,7 @@ CFG_PATH_MUNGE_i686-w64-mingw32 :=
521
521
CFG_LDPATH_i686-w64-mingw32 :=$(CFG_LDPATH_i686-w64-mingw32 ) :$(PATH )
522
522
CFG_RUN_i686-w64-mingw32=PATH ="$(CFG_LDPATH_i686-w64-mingw32 ) :$(1 ) " $(2 )
523
523
CFG_RUN_TARG_i686-w64-mingw32 =$(call CFG_RUN_i686-w64-mingw32,$(HLIB$(1 ) _H_$(CFG_BUILD ) ) ,$(2 ) )
524
- RUSTC_CROSS_FLAGS_i686-w64-mingw32 :=
524
+ RUSTC_CROSS_FLAGS_i686-w64-mingw32 :=--cfg sjlj
525
525
526
526
# x86_64-w64-mingw32 configuration
527
527
CROSS_PREFIX_x86_64-w64-mingw32 =x86_64-w64-mingw32-
Original file line number Diff line number Diff line change @@ -98,10 +98,11 @@ extern {}
98
98
extern "C" {
99
99
// iOS on armv7 uses SjLj exceptions and requires to link
100
100
// against corresponding routine (..._SjLj_...)
101
- #[ cfg( not( target_os = "ios" , target_arch = "arm" ) ) ]
101
+ #[ cfg( not( target_os = "ios" , target_arch = "arm" ) , not ( sjlj ) ) ]
102
102
pub fn _Unwind_RaiseException ( exception : * mut _Unwind_Exception )
103
103
-> _Unwind_Reason_Code ;
104
104
105
+ #[ cfg( sjlj) ]
105
106
#[ cfg( target_os = "ios" , target_arch = "arm" ) ]
106
107
fn _Unwind_SjLj_RaiseException ( e : * mut _Unwind_Exception )
107
108
-> _Unwind_Reason_Code ;
@@ -112,6 +113,7 @@ extern "C" {
112
113
// ... and now we just providing access to SjLj counterspart
113
114
// through a standard name to hide those details from others
114
115
// (see also comment above regarding _Unwind_RaiseException)
116
+ #[ cfg( sjlj) ]
115
117
#[ cfg( target_os = "ios" , target_arch = "arm" ) ]
116
118
#[ inline( always) ]
117
119
pub unsafe fn _Unwind_RaiseException ( exc : * mut _Unwind_Exception )
Original file line number Diff line number Diff line change @@ -224,7 +224,7 @@ fn rust_exception_class() -> uw::_Unwind_Exception_Class {
224
224
// This is achieved by overriding the return value in search phase to always
225
225
// say "catch!".
226
226
227
- #[ cfg( not( target_arch = "arm" ) , not( test) ) ]
227
+ #[ cfg( not( target_arch = "arm" ) , not( test) , not ( sjlj ) ) ]
228
228
#[ doc( hidden) ]
229
229
#[ allow( visible_private_types) ]
230
230
pub mod eabi {
@@ -279,6 +279,7 @@ pub mod eabi {
279
279
// iOS on armv7 is using SjLj exceptions and therefore requires to use
280
280
// a specialized personality routine: __gcc_personality_sj0
281
281
282
+ #[ cfg( sjlj) ]
282
283
#[ cfg( target_os = "ios" , target_arch = "arm" , not( test) ) ]
283
284
#[ doc( hidden) ]
284
285
#[ allow( visible_private_types) ]
@@ -521,3 +522,11 @@ pub unsafe fn register(f: Callback) -> bool {
521
522
}
522
523
}
523
524
}
525
+
526
+ // dummy functions for #12859
527
+ #[ cfg( sjlj) ]
528
+ #[ no_mangle]
529
+ #[ allow( non_snake_case_functions) ]
530
+ pub extern "C" fn _Unwind_Resume ( _ex_obj : * mut ( ) ) {
531
+ // _ex_obj is actually *mut uw::_Unwind_Exception, but it is private
532
+ }
You can’t perform that action at this time.
0 commit comments