File tree 10 files changed +23
-0
lines changed
src/tools/compiletest/src
10 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -941,6 +941,7 @@ pub fn make_test_description<R: Read>(
941
941
let has_hwasan = util:: HWASAN_SUPPORTED_TARGETS . contains ( & & * config. target ) ;
942
942
let has_memtag = util:: MEMTAG_SUPPORTED_TARGETS . contains ( & & * config. target ) ;
943
943
let has_shadow_call_stack = util:: SHADOWCALLSTACK_SUPPORTED_TARGETS . contains ( & & * config. target ) ;
944
+ let has_xray = util:: XRAY_SUPPORTED_TARGETS . contains ( & & * config. target ) ;
944
945
945
946
// For tests using the `needs-rust-lld` directive (e.g. for `-Zgcc-ld=lld`), we need to find
946
947
// whether `rust-lld` is present in the compiler under test.
@@ -1019,6 +1020,7 @@ pub fn make_test_description<R: Read>(
1019
1020
&& config. parse_name_directive( ln, "needs-sanitizer-shadow-call-stack" )
1020
1021
) ;
1021
1022
reason ! ( !config. can_unwind( ) && config. parse_name_directive( ln, "needs-unwind" ) ) ;
1023
+ reason ! ( !has_xray && config. parse_name_directive( ln, "needs-xray" ) ) ;
1022
1024
reason ! (
1023
1025
config. target == "wasm32-unknown-unknown"
1024
1026
&& config. parse_name_directive( ln, directives:: CHECK_RUN_RESULTS )
Original file line number Diff line number Diff line change @@ -78,6 +78,19 @@ pub const MEMTAG_SUPPORTED_TARGETS: &[&str] =
78
78
79
79
pub const SHADOWCALLSTACK_SUPPORTED_TARGETS : & [ & str ] = & [ "aarch64-linux-android" ] ;
80
80
81
+ pub const XRAY_SUPPORTED_TARGETS : & [ & str ] = & [
82
+ "aarch64-linux-android" ,
83
+ "aarch64-unknown-linux-gnu" ,
84
+ "aarch64-unknown-linux-musl" ,
85
+ "x86_64-linux-android" ,
86
+ "x86_64-unknown-freebsd" ,
87
+ "x86_64-unknown-linux-gnu" ,
88
+ "x86_64-unknown-linux-musl" ,
89
+ "x86_64-unknown-netbsd" ,
90
+ "x86_64-unknown-none-linuxkernel" ,
91
+ "x86_64-unknown-openbsd" ,
92
+ ] ;
93
+
81
94
pub fn make_new_path ( path : & str ) -> String {
82
95
assert ! ( cfg!( windows) ) ;
83
96
// Windows just uses PATH as the library search path, so we have to
Original file line number Diff line number Diff line change 1
1
// Checks that `-Z instrument-xray` produces expected instrumentation.
2
2
//
3
+ // needs-xray
3
4
// compile-flags: -Z instrument-xray=always
4
5
5
6
#![ crate_type = "lib" ]
Original file line number Diff line number Diff line change 1
1
// Checks that `-Z instrument-xray` options can be specified multiple times.
2
2
//
3
+ // needs-xray
3
4
// compile-flags: -Z instrument-xray=skip-exit
4
5
// compile-flags: -Z instrument-xray=instruction-threshold=123
5
6
// compile-flags: -Z instrument-xray=instruction-threshold=456
Original file line number Diff line number Diff line change 1
1
// Checks that the last `-Z instrument-xray` option wins.
2
2
//
3
+ // needs-xray
3
4
// compile-flags: -Z instrument-xray=always
4
5
// compile-flags: -Z instrument-xray=never
5
6
Original file line number Diff line number Diff line change 1
1
// Checks that `-Z instrument-xray` does not allow `always` and `never` simultaneously.
2
2
//
3
+ // needs-xray
3
4
// compile-flags: -Z instrument-xray=always,never
4
5
// error-pattern: incorrect value `always,never` for unstable option `instrument-xray`
5
6
Original file line number Diff line number Diff line change 1
1
// Checks that `-Z instrument-xray` allows `always` and `never` sequentially.
2
2
// (The last specified setting wins, like `-Z instrument-xray=no` as well.)
3
3
//
4
+ // needs-xray
4
5
// compile-flags: -Z instrument-xray=always
5
6
// compile-flags: -Z instrument-xray=never
6
7
// check-pass
Original file line number Diff line number Diff line change 1
1
// Verifies basic `-Z instrument-xray` flags.
2
2
//
3
+ // needs-xray
3
4
// compile-flags: -Z instrument-xray
4
5
// compile-flags: -Z instrument-xray=skip-exit
5
6
// compile-flags: -Z instrument-xray=ignore-loops,instruction-threshold=300
Original file line number Diff line number Diff line change 1
1
// Checks that `-Z instrument-xray` does not allow duplicates.
2
2
//
3
+ // needs-xray
3
4
// compile-flags: -Z instrument-xray=always,always
4
5
// error-pattern: incorrect value `always,always` for unstable option `instrument-xray`
5
6
Original file line number Diff line number Diff line change 1
1
// Checks that `-Z instrument-xray` does not allow duplicates.
2
2
//
3
+ // needs-xray
3
4
// compile-flags: -Z instrument-xray=ignore-loops,ignore-loops
4
5
// error-pattern: incorrect value `ignore-loops,ignore-loops` for unstable option `instrument-xray`
5
6
You can’t perform that action at this time.
0 commit comments