Fix a bunch of missing unwinder related definitions
cg_llvm likely just optimizes out their references for these tests, but cg_clif doesn't and would thus give a linker error.
This commit is contained in:
parent
fcb718b25f
commit
659da5843b
3 changed files with 16 additions and 2 deletions
|
|
@ -6,13 +6,14 @@
|
|||
//@ compile-flags:-C panic=abort
|
||||
//@ aux-build:helper.rs
|
||||
|
||||
#![feature(rustc_private, lang_items)]
|
||||
#![feature(rustc_private, lang_items, panic_unwind)]
|
||||
#![feature(alloc_error_handler)]
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
extern crate alloc;
|
||||
extern crate libc;
|
||||
extern crate unwind; // For _Unwind_Resume
|
||||
|
||||
// ARM targets need these symbols
|
||||
#[no_mangle]
|
||||
|
|
|
|||
|
|
@ -6,12 +6,13 @@
|
|||
//@ compile-flags:-C panic=abort
|
||||
//@ aux-build:helper.rs
|
||||
|
||||
#![feature(rustc_private, lang_items)]
|
||||
#![feature(rustc_private, lang_items, panic_unwind)]
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
extern crate alloc;
|
||||
extern crate libc;
|
||||
extern crate unwind; // For _Unwind_Resume
|
||||
|
||||
// ARM targets need these symbols
|
||||
#[no_mangle]
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
//@ compile-flags: -Cpanic=abort
|
||||
//@ ignore-wasm different `main` convention
|
||||
|
||||
#![feature(lang_items)]
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
|
|
@ -35,6 +36,17 @@ fn panic_handler(_info: &PanicInfo<'_>) -> ! {
|
|||
loop {}
|
||||
}
|
||||
|
||||
#[lang = "eh_personality"]
|
||||
extern "C" fn rust_eh_personality(
|
||||
_version: i32,
|
||||
_actions: i32,
|
||||
_exception_class: u64,
|
||||
_exception_object: *mut (),
|
||||
_context: *mut (),
|
||||
) -> i32 {
|
||||
loop {}
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
extern "C" fn main(_argc: c_int, _argv: *const *const c_char) -> c_int {
|
||||
0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue