@@ -186,6 +186,34 @@ const LLVM_TOOLS: &[&str] = &[
186186
187187pub const VERSION : usize = 2 ;
188188
189+ /// Extra --check-cfg to add when building
190+ /// (Mode restriction, config name, config values (if any))
191+ const EXTRA_CHECK_CFGS : & [ ( Option < Mode > , & ' static str , Option < & [ & ' static str ] > ) ] = & [
192+ ( None , "bootstrap" , None ) ,
193+ ( Some ( Mode :: Rustc ) , "parallel_compiler" , None ) ,
194+ ( Some ( Mode :: ToolRustc ) , "parallel_compiler" , None ) ,
195+ ( Some ( Mode :: Std ) , "miri" , None ) ,
196+ ( Some ( Mode :: Std ) , "stdarch_intel_sde" , None ) ,
197+ ( Some ( Mode :: Std ) , "no_fp_fmt_parse" , None ) ,
198+ ( Some ( Mode :: Std ) , "no_global_oom_handling" , None ) ,
199+ ( Some ( Mode :: Std ) , "freebsd12" , None ) ,
200+ ( Some ( Mode :: Std ) , "backtrace_in_libstd" , None ) ,
201+ // FIXME: Used by rustfmt is their test but is invalid (neither cargo nor bootstrap ever set
202+ // this config) should probably by removed or use a allow attribute.
203+ ( Some ( Mode :: ToolRustc ) , "release" , None ) ,
204+ // FIXME: Used by stdarch in their test, should use a allow attribute instead.
205+ ( Some ( Mode :: Std ) , "dont_compile_me" , None ) ,
206+ // FIXME: Used by serde_json, but we should not be triggering on external dependencies.
207+ ( Some ( Mode :: Rustc ) , "no_btreemap_remove_entry" , None ) ,
208+ ( Some ( Mode :: ToolRustc ) , "no_btreemap_remove_entry" , None ) ,
209+ // FIXME: Used by crossbeam-utils, but we should not be triggering on external dependencies.
210+ ( Some ( Mode :: Rustc ) , "crossbeam_loom" , None ) ,
211+ ( Some ( Mode :: ToolRustc ) , "crossbeam_loom" , None ) ,
212+ // FIXME: Used by proc-macro2, but we should not be triggering on external dependencies.
213+ ( Some ( Mode :: Rustc ) , "span_locations" , None ) ,
214+ ( Some ( Mode :: ToolRustc ) , "span_locations" , None ) ,
215+ ] ;
216+
189217/// A structure representing a Rust compiler.
190218///
191219/// Each compiler has a `stage` that it is associated with and a `host` that
0 commit comments