@@ -208,6 +208,8 @@ pub struct TestProps {
208
208
pub llvm_cov_flags : Vec < String > ,
209
209
/// Extra flags to pass to LLVM's `filecheck` tool, in tests that use it.
210
210
pub filecheck_flags : Vec < String > ,
211
+ /// Don't automatically insert any `--check-cfg` args
212
+ pub no_auto_check_cfg : bool ,
211
213
}
212
214
213
215
mod directives {
@@ -249,6 +251,7 @@ mod directives {
249
251
pub const COMPARE_OUTPUT_LINES_BY_SUBSET : & ' static str = "compare-output-lines-by-subset" ;
250
252
pub const LLVM_COV_FLAGS : & ' static str = "llvm-cov-flags" ;
251
253
pub const FILECHECK_FLAGS : & ' static str = "filecheck-flags" ;
254
+ pub const NO_AUTO_CHECK_CFG : & ' static str = "no-auto-check-cfg" ;
252
255
// This isn't a real directive, just one that is probably mistyped often
253
256
pub const INCORRECT_COMPILER_FLAGS : & ' static str = "compiler-flags" ;
254
257
}
@@ -304,6 +307,7 @@ impl TestProps {
304
307
remap_src_base : false ,
305
308
llvm_cov_flags : vec ! [ ] ,
306
309
filecheck_flags : vec ! [ ] ,
310
+ no_auto_check_cfg : false ,
307
311
}
308
312
}
309
313
@@ -567,6 +571,8 @@ impl TestProps {
567
571
if let Some ( flags) = config. parse_name_value_directive ( ln, FILECHECK_FLAGS ) {
568
572
self . filecheck_flags . extend ( split_flags ( & flags) ) ;
569
573
}
574
+
575
+ config. set_name_directive ( ln, NO_AUTO_CHECK_CFG , & mut self . no_auto_check_cfg ) ;
570
576
} ,
571
577
) ;
572
578
@@ -860,6 +866,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
860
866
"needs-unwind" ,
861
867
"needs-wasmtime" ,
862
868
"needs-xray" ,
869
+ "no-auto-check-cfg" ,
863
870
"no-prefer-dynamic" ,
864
871
"normalize-stderr-32bit" ,
865
872
"normalize-stderr-64bit" ,
0 commit comments