Closed
Description
Minimal test case:
#![feature(no_std, lang_items, core, libc)]
#![no_std]
extern crate core;
extern crate libc;
use core::fmt;
#[lang="panic_fmt"]
extern fn panic_fmt(msg: &fmt::Arguments, file: &'static str, line: u32) -> ! {
loop { }
}
#[lang="stack_exhausted"]
extern fn stack_exhausted() {
loop { }
}
#[lang="eh_personality"]
extern fn eh_personality() {
loop { }
}
Compile with:
rustc --crate-type staticlib lib.rs -C lto --emit asm -C opt-level=2