mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
Fix test on targets with crt-static default
This commit is contained in:
parent
34c248d31f
commit
9090ed8119
@ -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"]
|
||||
|
||||
|
@ -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"]
|
||||
|
||||
|
@ -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)]
|
||||
|
@ -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)]
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user