mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-30 12:07:40 +00:00

minicore makes it much easier to add new language items to all of the existing `no_core` tests.
19 lines
468 B
Rust
19 lines
468 B
Rust
//@ add-core-stubs
|
|
//@ compile-flags: --target riscv64imac-unknown-none-elf -Zsanitizer=shadow-call-stack
|
|
//@ needs-llvm-components: riscv
|
|
|
|
#![allow(internal_features)]
|
|
#![crate_type = "rlib"]
|
|
#![feature(no_core, lang_items)]
|
|
#![no_core]
|
|
|
|
extern crate minicore;
|
|
use minicore::*;
|
|
|
|
// CHECK: ; Function Attrs:{{.*}}shadowcallstack
|
|
// CHECK: define dso_local void @foo() unnamed_addr #0
|
|
#[no_mangle]
|
|
pub fn foo() {}
|
|
|
|
// CHECK: attributes #0 = {{.*}}shadowcallstack{{.*}}
|