@@ -88,6 +88,9 @@ impl EarlyProps {
88
88
}
89
89
}
90
90
91
+ let rustc_has_profiler_support = env:: var_os ( "RUSTC_PROFILER_SUPPORT" ) . is_some ( ) ;
92
+ let rustc_has_sanitizer_support = env:: var_os ( "RUSTC_SANITIZER_SUPPORT" ) . is_some ( ) ;
93
+
91
94
iter_header ( testfile, None , & mut |ln| {
92
95
// we should check if any only-<platform> exists and if it exists
93
96
// and does not matches the current platform, skip the test
@@ -116,6 +119,16 @@ impl EarlyProps {
116
119
config. parse_needs_matching_clang ( ln) {
117
120
props. ignore = Ignore :: Ignore ;
118
121
}
122
+
123
+ if !rustc_has_profiler_support &&
124
+ config. parse_needs_profiler_support ( ln) {
125
+ props. ignore = Ignore :: Ignore ;
126
+ }
127
+
128
+ if !rustc_has_sanitizer_support &&
129
+ config. parse_needs_sanitizer_support ( ln) {
130
+ props. ignore = Ignore :: Ignore ;
131
+ }
119
132
}
120
133
121
134
if ( config. mode == common:: DebugInfoGdb || config. mode == common:: DebugInfoBoth ) &&
@@ -748,6 +761,14 @@ impl Config {
748
761
self . parse_name_directive ( line, "needs-matching-clang" )
749
762
}
750
763
764
+ fn parse_needs_profiler_support ( & self , line : & str ) -> bool {
765
+ self . parse_name_directive ( line, "needs-profiler-support" )
766
+ }
767
+
768
+ fn parse_needs_sanitizer_support ( & self , line : & str ) -> bool {
769
+ self . parse_name_directive ( line, "needs-sanitizer-support" )
770
+ }
771
+
751
772
/// Parses a name-value directive which contains config-specific information, e.g., `ignore-x86`
752
773
/// or `normalize-stderr-32bit`.
753
774
fn parse_cfg_name_directive ( & self , line : & str , prefix : & str ) -> ParsedNameDirective {
0 commit comments