translate / export weak lang items
see #51671 for details fixes #51671 fixes #51342
This commit is contained in:
parent
01172a7d13
commit
9ef134dcad
4 changed files with 42 additions and 0 deletions
13
src/test/run-make-fulldeps/issue-51671/Makefile
Normal file
13
src/test/run-make-fulldeps/issue-51671/Makefile
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
-include ../tools.mk
|
||||
|
||||
ifdef IS_WINDOWS
|
||||
# Do nothing on MSVC.
|
||||
all:
|
||||
exit 0
|
||||
else
|
||||
all:
|
||||
$(RUSTC) --emit=obj app.rs
|
||||
nm $(TMPDIR)/app.o | $(CGREP) rust_begin_unwind
|
||||
nm $(TMPDIR)/app.o | $(CGREP) rust_eh_personality
|
||||
nm $(TMPDIR)/app.o | $(CGREP) rust_oom
|
||||
endif
|
||||
18
src/test/run-make-fulldeps/issue-51671/app.rs
Normal file
18
src/test/run-make-fulldeps/issue-51671/app.rs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#![crate_type = "bin"]
|
||||
#![feature(lang_items)]
|
||||
#![feature(panic_implementation)]
|
||||
#![no_main]
|
||||
#![no_std]
|
||||
|
||||
use core::panic::PanicInfo;
|
||||
|
||||
#[panic_implementation]
|
||||
fn panic(_: &PanicInfo) -> ! {
|
||||
loop {}
|
||||
}
|
||||
|
||||
#[lang = "eh_personality"]
|
||||
fn eh() {}
|
||||
|
||||
#[lang = "oom"]
|
||||
fn oom() {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue