File tree Expand file tree Collapse file tree 10 files changed +77
-24
lines changed
compiler/rustc_codegen_cranelift/scripts Expand file tree Collapse file tree 10 files changed +77
-24
lines changed Original file line number Diff line number Diff line change @@ -151,20 +151,6 @@ rm tests/ui/process/process-panic-after-fork.rs # same
151
151
cp ../dist/bin/rustdoc-clif ../dist/bin/rustdoc # some tests expect bin/rustdoc to exist
152
152
153
153
cat << EOF | git apply -
154
- diff --git a/tests/run-make/linker-warning/rmake.rs b/tests/run-make/linker-warning/rmake.rs
155
- index 30387af428c..f7895b12961 100644
156
- --- a/tests/run-make/linker-warning/rmake.rs
157
- +++ b/tests/run-make/linker-warning/rmake.rs
158
- @@ -57,7 +57,8 @@ fn main() {
159
- .actual_text("(linker error)", out.stderr())
160
- - .normalize(r#"/rustc[^/]*/"#, "/rustc/")
161
- + .normalize(r#"/tmp/rustc[^/]*/"#, "/tmp/rustc/")
162
- + .normalize("libpanic_abort", "libpanic_unwind")
163
- .normalize(
164
- regex::escape(run_make_support::build_root().to_str().unwrap()),
165
- "/build-root",
166
- )
167
- .normalize(r#""[^"]*\/symbols.o""#, "\\ "/symbols.o\\ "")
168
154
diff --git a/src/tools/compiletest/src/runtest/run_make.rs b/src/tools/compiletest/src/runtest/run_make.rs
169
155
index 073116933bd..c3e4578204d 100644
170
156
--- a/src/tools/compiletest/src/runtest/run_make.rs
Original file line number Diff line number Diff line change @@ -12,7 +12,15 @@ fn panic(_: &PanicInfo) -> ! {
12
12
}
13
13
14
14
#[ lang = "eh_personality" ]
15
- fn eh ( ) { }
15
+ fn eh (
16
+ _version : i32 ,
17
+ _actions : i32 ,
18
+ _exception_class : u64 ,
19
+ _exception_object : * mut ( ) ,
20
+ _context : * mut ( ) ,
21
+ ) -> i32 {
22
+ loop { }
23
+ }
16
24
17
25
#[ alloc_error_handler]
18
26
fn oom ( _: Layout ) -> ! {
Original file line number Diff line number Diff line change @@ -21,6 +21,12 @@ extern "C" fn __rust_foreign_exception() -> ! {
21
21
}
22
22
23
23
#[ lang = "eh_personality" ]
24
- fn eh_personality ( ) {
24
+ fn eh_personality (
25
+ _version : i32 ,
26
+ _actions : i32 ,
27
+ _exception_class : u64 ,
28
+ _exception_object : * mut ( ) ,
29
+ _context : * mut ( ) ,
30
+ ) -> i32 {
25
31
loop { }
26
32
}
Original file line number Diff line number Diff line change @@ -57,7 +57,8 @@ fn main() {
57
57
diff ( )
58
58
. expected_file ( "short-error.txt" )
59
59
. actual_text ( "(linker error)" , out. stderr ( ) )
60
- . normalize ( r#"/rustc[^/]*/"# , "/rustc/" )
60
+ . normalize ( r#"/rustc[^/_-]*/"# , "/rustc/" )
61
+ . normalize ( "libpanic_abort" , "libpanic_unwind" )
61
62
. normalize (
62
63
regex:: escape ( run_make_support:: build_root ( ) . to_str ( ) . unwrap ( ) ) ,
63
64
"/build-root" ,
Original file line number Diff line number Diff line change @@ -12,7 +12,13 @@ fn panic_handler(_: &core::panic::PanicInfo) -> ! {
12
12
}
13
13
14
14
#[ no_mangle]
15
- extern "C" fn rust_eh_personality ( ) {
15
+ extern "C" fn rust_eh_personality (
16
+ _version : i32 ,
17
+ _actions : i32 ,
18
+ _exception_class : u64 ,
19
+ _exception_object : * mut ( ) ,
20
+ _context : * mut ( ) ,
21
+ ) -> i32 {
16
22
loop { }
17
23
}
18
24
Original file line number Diff line number Diff line change 6
6
//@ compile-flags:-C panic=abort
7
7
//@ aux-build:helper.rs
8
8
9
- #![ feature( rustc_private, lang_items) ]
9
+ #![ feature( rustc_private, lang_items, panic_unwind ) ]
10
10
#![ feature( alloc_error_handler) ]
11
11
#![ no_std]
12
12
#![ no_main]
13
13
14
14
extern crate alloc;
15
15
extern crate libc;
16
+ extern crate unwind; // For _Unwind_Resume
16
17
17
18
// ARM targets need these symbols
18
19
#[ no_mangle]
@@ -70,7 +71,15 @@ fn panic(panic_info: &core::panic::PanicInfo) -> ! {
70
71
// in these libraries will refer to `rust_eh_personality` if LLVM can not *prove* the contents won't
71
72
// unwind. So, for this test case we will define the symbol.
72
73
#[ lang = "eh_personality" ]
73
- extern "C" fn rust_eh_personality ( ) { }
74
+ extern "C" fn rust_eh_personality (
75
+ _version : i32 ,
76
+ _actions : i32 ,
77
+ _exception_class : u64 ,
78
+ _exception_object : * mut ( ) ,
79
+ _context : * mut ( ) ,
80
+ ) -> i32 {
81
+ loop { }
82
+ }
74
83
75
84
#[ derive( Default , Debug ) ]
76
85
struct Page ( #[ allow( dead_code) ] [ [ u64 ; 32 ] ; 16 ] ) ;
Original file line number Diff line number Diff line change 6
6
//@ compile-flags:-C panic=abort
7
7
//@ aux-build:helper.rs
8
8
9
- #![ feature( rustc_private, lang_items) ]
9
+ #![ feature( rustc_private, lang_items, panic_unwind ) ]
10
10
#![ no_std]
11
11
#![ no_main]
12
12
13
13
extern crate alloc;
14
14
extern crate libc;
15
+ extern crate unwind; // For _Unwind_Resume
15
16
16
17
// ARM targets need these symbols
17
18
#[ no_mangle]
@@ -57,7 +58,15 @@ fn panic(panic_info: &core::panic::PanicInfo) -> ! {
57
58
// in these libraries will refer to `rust_eh_personality` if LLVM can not *prove* the contents won't
58
59
// unwind. So, for this test case we will define the symbol.
59
60
#[ lang = "eh_personality" ]
60
- extern "C" fn rust_eh_personality ( ) { }
61
+ extern "C" fn rust_eh_personality (
62
+ _version : i32 ,
63
+ _actions : i32 ,
64
+ _exception_class : u64 ,
65
+ _exception_object : * mut ( ) ,
66
+ _context : * mut ( ) ,
67
+ ) -> i32 {
68
+ loop { }
69
+ }
61
70
62
71
#[ derive( Default , Debug ) ]
63
72
struct Page ( #[ allow( dead_code) ] [ [ u64 ; 32 ] ; 16 ] ) ;
Original file line number Diff line number Diff line change @@ -12,4 +12,12 @@ pub fn begin_panic_handler(_info: &core::panic::PanicInfo<'_>) -> ! {
12
12
}
13
13
14
14
#[ lang = "eh_personality" ]
15
- extern "C" fn eh_personality ( ) { }
15
+ extern "C" fn eh_personality (
16
+ _version : i32 ,
17
+ _actions : i32 ,
18
+ _exception_class : u64 ,
19
+ _exception_object : * mut ( ) ,
20
+ _context : * mut ( ) ,
21
+ ) -> i32 {
22
+ loop { }
23
+ }
Original file line number Diff line number Diff line change 4
4
//@ compile-flags: -Cpanic=abort
5
5
//@ ignore-wasm different `main` convention
6
6
7
+ #![ feature( lang_items) ]
7
8
#![ no_std]
8
9
#![ no_main]
9
10
@@ -35,6 +36,17 @@ fn panic_handler(_info: &PanicInfo<'_>) -> ! {
35
36
loop { }
36
37
}
37
38
39
+ #[ lang = "eh_personality" ]
40
+ extern "C" fn rust_eh_personality (
41
+ _version : i32 ,
42
+ _actions : i32 ,
43
+ _exception_class : u64 ,
44
+ _exception_object : * mut ( ) ,
45
+ _context : * mut ( ) ,
46
+ ) -> i32 {
47
+ loop { }
48
+ }
49
+
38
50
#[ no_mangle]
39
51
extern "C" fn main ( _argc : c_int , _argv : * const * const c_char ) -> c_int {
40
52
0
Original file line number Diff line number Diff line change @@ -21,4 +21,12 @@ pub fn test(_: DropMe) {
21
21
}
22
22
23
23
#[ rustc_std_internal_symbol]
24
- pub unsafe extern "C" fn rust_eh_personality ( ) { }
24
+ pub unsafe extern "C" fn rust_eh_personality (
25
+ _version : i32 ,
26
+ _actions : i32 ,
27
+ _exception_class : u64 ,
28
+ _exception_object : * mut ( ) ,
29
+ _context : * mut ( ) ,
30
+ ) -> i32 {
31
+ loop { }
32
+ }
You can’t perform that action at this time.
0 commit comments