2025-02-24 09:26:54 +00:00
|
|
|
//@ add-core-stubs
|
2024-08-20 15:30:47 +00:00
|
|
|
//@ 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]
|
|
|
|
|
2025-02-24 09:26:54 +00:00
|
|
|
extern crate minicore;
|
|
|
|
use minicore::*;
|
2024-08-20 15:30:47 +00:00
|
|
|
|
|
|
|
// CHECK: ; Function Attrs:{{.*}}shadowcallstack
|
|
|
|
// CHECK: define dso_local void @foo() unnamed_addr #0
|
|
|
|
#[no_mangle]
|
|
|
|
pub fn foo() {}
|
|
|
|
|
|
|
|
// CHECK: attributes #0 = {{.*}}shadowcallstack{{.*}}
|