@@ -74,7 +74,7 @@ const LLVM_TOOLS: &[&str] = &[
74
74
/// LLD file names for all flavors.
75
75
const LLD_FILE_NAMES : & [ & str ] = & [ "ld.lld" , "ld64.lld" , "lld-link" , "wasm-ld" ] ;
76
76
77
- /// Extra --check-cfg to add when building
77
+ /// Extra ` --check-cfg` to add when building the compiler or tools
78
78
/// (Mode restriction, config name, config values (if any))
79
79
#[ allow( clippy:: type_complexity) ] // It's fine for hard-coded list and type is explained above.
80
80
const EXTRA_CHECK_CFGS : & [ ( Option < Mode > , & str , Option < & [ & ' static str ] > ) ] = & [
@@ -84,38 +84,9 @@ const EXTRA_CHECK_CFGS: &[(Option<Mode>, &str, Option<&[&'static str]>)] = &[
84
84
( Some ( Mode :: ToolRustc ) , "rust_analyzer" , None ) ,
85
85
( Some ( Mode :: ToolStd ) , "rust_analyzer" , None ) ,
86
86
( Some ( Mode :: Codegen ) , "parallel_compiler" , None ) ,
87
- // NOTE: consider updating `check-cfg` entries in `std/Cargo.toml` too.
88
- // cfg(bootstrap) remove these once the bootstrap compiler supports
89
- // `lints.rust.unexpected_cfgs.check-cfg`
90
- ( Some ( Mode :: Std ) , "stdarch_intel_sde" , None ) ,
91
- ( Some ( Mode :: Std ) , "no_fp_fmt_parse" , None ) ,
92
- ( Some ( Mode :: Std ) , "no_global_oom_handling" , None ) ,
93
- ( Some ( Mode :: Std ) , "no_rc" , None ) ,
94
- ( Some ( Mode :: Std ) , "no_sync" , None ) ,
95
- /* Extra values not defined in the built-in targets yet, but used in std */
96
- ( Some ( Mode :: Std ) , "target_env" , Some ( & [ "libnx" , "p2" ] ) ) ,
97
- ( Some ( Mode :: Std ) , "target_os" , Some ( & [ "visionos" ] ) ) ,
98
- ( Some ( Mode :: Std ) , "target_arch" , Some ( & [ "arm64ec" , "spirv" , "nvptx" , "xtensa" ] ) ) ,
99
- ( Some ( Mode :: ToolStd ) , "target_os" , Some ( & [ "visionos" ] ) ) ,
100
- /* Extra names used by dependencies */
101
- // FIXME: Used by serde_json, but we should not be triggering on external dependencies.
102
- ( Some ( Mode :: Rustc ) , "no_btreemap_remove_entry" , None ) ,
103
- ( Some ( Mode :: ToolRustc ) , "no_btreemap_remove_entry" , None ) ,
104
- // FIXME: Used by crossbeam-utils, but we should not be triggering on external dependencies.
105
- ( Some ( Mode :: Rustc ) , "crossbeam_loom" , None ) ,
106
- ( Some ( Mode :: ToolRustc ) , "crossbeam_loom" , None ) ,
107
- // FIXME: Used by proc-macro2, but we should not be triggering on external dependencies.
108
- ( Some ( Mode :: Rustc ) , "span_locations" , None ) ,
109
- ( Some ( Mode :: ToolRustc ) , "span_locations" , None ) ,
110
- // FIXME: Used by rustix, but we should not be triggering on external dependencies.
111
- ( Some ( Mode :: Rustc ) , "rustix_use_libc" , None ) ,
112
- ( Some ( Mode :: ToolRustc ) , "rustix_use_libc" , None ) ,
113
- // FIXME: Used by filetime, but we should not be triggering on external dependencies.
114
- ( Some ( Mode :: Rustc ) , "emulate_second_only_system" , None ) ,
115
- ( Some ( Mode :: ToolRustc ) , "emulate_second_only_system" , None ) ,
116
- // Needed to avoid the need to copy windows.lib into the sysroot.
117
- ( Some ( Mode :: Rustc ) , "windows_raw_dylib" , None ) ,
118
- ( Some ( Mode :: ToolRustc ) , "windows_raw_dylib" , None ) ,
87
+ // Any library specific cfgs like `target_os`, `target_arch` should be put in
88
+ // priority the `[lints.rust.unexpected_cfgs.check-cfg]` table
89
+ // in the appropriate `library/{std,alloc,core}/Cargo.toml`
119
90
] ;
120
91
121
92
/// A structure representing a Rust compiler.
0 commit comments