File tree 7 files changed +31
-12
lines changed
compiler/rustc_target/src/spec/targets
src/tools/compiletest/src
7 files changed +31
-12
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ pub fn target() -> Target {
19
19
stack_probes : StackProbeType :: Inline ,
20
20
supported_sanitizers : SanitizerSet :: ADDRESS
21
21
| SanitizerSet :: CFI
22
+ | SanitizerSet :: KCFI
22
23
| SanitizerSet :: LEAK
23
24
| SanitizerSet :: MEMORY
24
25
| SanitizerSet :: MEMTAG
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ pub fn target() -> Target {
10
10
base. static_position_independent_executables = true ;
11
11
base. supported_sanitizers = SanitizerSet :: ADDRESS
12
12
| SanitizerSet :: CFI
13
+ | SanitizerSet :: KCFI
13
14
| SanitizerSet :: DATAFLOW
14
15
| SanitizerSet :: LEAK
15
16
| SanitizerSet :: MEMORY
Original file line number Diff line number Diff line change @@ -827,6 +827,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
827
827
"needs-sanitizer-cfi" ,
828
828
"needs-sanitizer-dataflow" ,
829
829
"needs-sanitizer-hwaddress" ,
830
+ "needs-sanitizer-kcfi" ,
830
831
"needs-sanitizer-leak" ,
831
832
"needs-sanitizer-memory" ,
832
833
"needs-sanitizer-memtag" ,
Original file line number Diff line number Diff line change 5
5
//
6
6
// This checks that the reified function pointer will have the expected alias set at its call-site.
7
7
8
- //@ needs-sanitizer- cfi
8
+ //@ revisions: cfi kcfi
9
9
// FIXME(#122848) Remove only-linux once OSX CFI binaries work
10
10
//@ only-linux
11
- //@ compile-flags: --crate-type=bin -Cprefer-dynamic=off -Clto -Zsanitizer=cfi
12
- //@ compile-flags: -C target-feature=-crt-static -C codegen-units=1 -C opt-level=0
11
+ //@ [cfi] needs-sanitizer-cfi
12
+ //@ [kcfi] needs-sanitizer-kcfi
13
+ //@ compile-flags: -C target-feature=-crt-static
14
+ //@ [cfi] compile-flags: -C codegen-units=1 -C lto -C prefer-dynamic=off -C opt-level=0
15
+ //@ [cfi] compile-flags: -Z sanitizer=cfi
16
+ //@ [kcfi] compile-flags: -Z sanitizer=kcfi
13
17
//@ run-pass
14
18
15
19
pub fn main ( ) {
Original file line number Diff line number Diff line change 2
2
// * Arc<dyn Foo> as for custom receivers
3
3
// * &dyn Bar<T=Baz> for type constraints
4
4
5
- //@ needs-sanitizer- cfi
5
+ //@ revisions: cfi kcfi
6
6
// FIXME(#122848) Remove only-linux once OSX CFI binaries work
7
7
//@ only-linux
8
- //@ compile-flags: --crate-type=bin -Cprefer-dynamic=off -Clto -Zsanitizer=cfi
9
- //@ compile-flags: -C target-feature=-crt-static -C codegen-units=1 -C opt-level=0
8
+ //@ [cfi] needs-sanitizer-cfi
9
+ //@ [kcfi] needs-sanitizer-kcfi
10
+ //@ compile-flags: -C target-feature=-crt-static
11
+ //@ [cfi] compile-flags: -C codegen-units=1 -C lto -C prefer-dynamic=off -C opt-level=0
12
+ //@ [cfi] compile-flags: -Z sanitizer=cfi
13
+ //@ [kcfi] compile-flags: -Z sanitizer=kcfi
10
14
//@ run-pass
11
15
12
16
use std:: sync:: Arc ;
Original file line number Diff line number Diff line change 1
1
// Check that encoding self-referential types works with #[repr(transparent)]
2
2
3
- //@ needs-sanitizer- cfi
3
+ //@ revisions: cfi kcfi
4
4
// FIXME(#122848) Remove only-linux once OSX CFI binaries work
5
5
//@ only-linux
6
- //@ compile-flags: --crate-type=bin -Cprefer-dynamic=off -Clto -Zsanitizer=cfi
7
- //@ compile-flags: -C target-feature=-crt-static -C codegen-units=1 -C opt-level=0
6
+ //@ [cfi] needs-sanitizer-cfi
7
+ //@ [kcfi] needs-sanitizer-kcfi
8
+ //@ compile-flags: -C target-feature=-crt-static
9
+ //@ [cfi] compile-flags: -C codegen-units=1 -C lto -C prefer-dynamic=off -C opt-level=0
10
+ //@ [cfi] compile-flags: -Z sanitizer=cfi
11
+ //@ [kcfi] compile-flags: -Z sanitizer=kcfi
8
12
//@ run-pass
9
13
10
14
use std:: marker:: PhantomData ;
Original file line number Diff line number Diff line change 1
1
// Tests that calling a trait object method on a trait object with additional auto traits works.
2
2
3
- //@ needs-sanitizer- cfi
3
+ //@ revisions: cfi kcfi
4
4
// FIXME(#122848) Remove only-linux once OSX CFI binaries work
5
5
//@ only-linux
6
- //@ compile-flags: --crate-type=bin -Cprefer-dynamic=off -Clto -Zsanitizer=cfi
7
- //@ compile-flags: -C target-feature=-crt-static -C codegen-units=1 -C opt-level=0
6
+ //@ [cfi] needs-sanitizer-cfi
7
+ //@ [kcfi] needs-sanitizer-kcfi
8
+ //@ compile-flags: -C target-feature=-crt-static
9
+ //@ [cfi] compile-flags: -C codegen-units=1 -C lto -C prefer-dynamic=off -C opt-level=0
10
+ //@ [cfi] compile-flags: -Z sanitizer=cfi
11
+ //@ [kcfi] compile-flags: -Z sanitizer=kcfi
8
12
//@ run-pass
9
13
10
14
trait Foo {
You can’t perform that action at this time.
0 commit comments