2022-11-21 21:29:00 -08:00
|
|
|
// Verifies that "kcfi" module flag is added.
|
|
|
|
|
//
|
2025-02-24 09:26:54 +00:00
|
|
|
//@ add-core-stubs
|
2023-09-10 00:00:00 +00:00
|
|
|
//@ revisions: aarch64 x86_64
|
|
|
|
|
//@ [aarch64] compile-flags: --target aarch64-unknown-none
|
|
|
|
|
//@ [aarch64] needs-llvm-components: aarch64
|
|
|
|
|
//@ [x86_64] compile-flags: --target x86_64-unknown-none
|
|
|
|
|
//@ [x86_64] needs-llvm-components: x86
|
2022-11-21 21:29:00 -08:00
|
|
|
//@ compile-flags: -Ctarget-feature=-crt-static -Zsanitizer=kcfi
|
|
|
|
|
|
2023-09-10 00:00:00 +00:00
|
|
|
#![feature(no_core, lang_items)]
|
2024-05-29 14:11:20 +10:00
|
|
|
#![crate_type = "lib"]
|
2023-09-10 00:00:00 +00:00
|
|
|
#![no_core]
|
|
|
|
|
|
2025-02-24 09:26:54 +00:00
|
|
|
extern crate minicore;
|
|
|
|
|
use minicore::*;
|
2022-11-21 21:29:00 -08:00
|
|
|
|
2024-05-29 14:11:20 +10:00
|
|
|
pub fn foo() {}
|
2022-11-21 21:29:00 -08:00
|
|
|
|
|
|
|
|
// CHECK: !{{[0-9]+}} = !{i32 4, !"kcfi", i32 1}
|