Fix test on targets with crt-static default

This commit is contained in:
Tomasz Miąsko 2023-09-21 00:00:00 +00:00
parent 34c248d31f
commit 9090ed8119
6 changed files with 16 additions and 11 deletions

View File

@ -19,8 +19,9 @@
// only-linux
//
// revisions:ASAN ASAN-FAT-LTO
//[ASAN] compile-flags: -Zsanitizer=address
//[ASAN-FAT-LTO] compile-flags: -Zsanitizer=address -Cprefer-dynamic=false -Clto=fat
// compile-flags: -Zsanitizer=address -Ctarget-feature=-crt-static
//[ASAN] compile-flags:
//[ASAN-FAT-LTO] compile-flags: -Cprefer-dynamic=false -Clto=fat
#![crate_type="staticlib"]

View File

@ -4,11 +4,12 @@
// needs-sanitizer-memory
// revisions:MSAN-0 MSAN-1 MSAN-2 MSAN-1-LTO MSAN-2-LTO
//
//[MSAN-0] compile-flags: -Zsanitizer=memory
//[MSAN-1] compile-flags: -Zsanitizer=memory -Zsanitizer-memory-track-origins=1
//[MSAN-2] compile-flags: -Zsanitizer=memory -Zsanitizer-memory-track-origins
//[MSAN-1-LTO] compile-flags: -Zsanitizer=memory -Zsanitizer-memory-track-origins=1 -C lto=fat
//[MSAN-2-LTO] compile-flags: -Zsanitizer=memory -Zsanitizer-memory-track-origins -C lto=fat
// compile-flags: -Zsanitizer=memory -Ctarget-feature=-crt-static
//[MSAN-0] compile-flags:
//[MSAN-1] compile-flags: -Zsanitizer-memory-track-origins=1
//[MSAN-2] compile-flags: -Zsanitizer-memory-track-origins
//[MSAN-1-LTO] compile-flags: -Zsanitizer-memory-track-origins=1 -C lto=fat
//[MSAN-2-LTO] compile-flags: -Zsanitizer-memory-track-origins -C lto=fat
#![crate_type="lib"]

View File

@ -4,8 +4,9 @@
// needs-sanitizer-address
// needs-sanitizer-leak
// revisions: ASAN LSAN
//[ASAN] compile-flags: -Zsanitizer=address -C opt-level=3 -Z mir-opt-level=4
//[LSAN] compile-flags: -Zsanitizer=leak -C opt-level=3 -Z mir-opt-level=4
// compile-flags: -Copt-level=3 -Zmir-opt-level=4 -Ctarget-feature=-crt-static
//[ASAN] compile-flags: -Zsanitizer=address
//[LSAN] compile-flags: -Zsanitizer=leak
#![crate_type="lib"]
#![feature(no_sanitize)]

View File

@ -2,7 +2,7 @@
// selectively disable sanitizer instrumentation.
//
// needs-sanitizer-address
// compile-flags: -Zsanitizer=address
// compile-flags: -Zsanitizer=address -Ctarget-feature=-crt-static
#![crate_type="lib"]
#![feature(no_sanitize)]

View File

@ -6,6 +6,7 @@
// revisions:ASAN ASAN-RECOVER MSAN MSAN-RECOVER MSAN-RECOVER-LTO
// no-prefer-dynamic
//
// compile-flags: -Ctarget-feature=-crt-static
//[ASAN] compile-flags: -Zsanitizer=address -Copt-level=0
//[ASAN-RECOVER] compile-flags: -Zsanitizer=address -Zsanitizer-recover=address -Copt-level=0
//[MSAN] compile-flags: -Zsanitizer=memory

View File

@ -3,11 +3,12 @@
// check-pass
// revisions: address cfi kcfi leak memory thread
//compile-flags: -Ctarget-feature=-crt-static
//[address]needs-sanitizer-address
//[address]compile-flags: -Zsanitizer=address --cfg address
//[cfi]needs-sanitizer-cfi
//[cfi]compile-flags: -Zsanitizer=cfi --cfg cfi
//[cfi]compile-flags: -Clto -Ccodegen-units=1 -Ctarget-feature=-crt-static
//[cfi]compile-flags: -Clto -Ccodegen-units=1
//[kcfi]needs-llvm-components: x86
//[kcfi]compile-flags: -Zsanitizer=kcfi --cfg kcfi --target x86_64-unknown-none
//[leak]needs-sanitizer-leak