Skip to content

Commit a01a540

Browse files
committed
Cleanup extra check configs in bootstrap
- `target_os=watchos`: no longer relevant because there are now proper targets `*-apple-watchos` - `target_arch=nvptx64`: `nvptx64-nvidia-cuda` - `target_arch=le32`: target was removed (rust-lang#45041) - `release`: was removed from rustfmt (rust-lang/rustfmt#5375 and rust-lang/rustfmt#5449) - `dont_compile_me`: was removed from stdarch (rust-lang/stdarch#1308) Also made some external cfg exception mode clear and only activated for rustc and rustc tools (as to not have the Standard Library unintentionally depend on them).
1 parent dde74fe commit a01a540

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

src/bootstrap/lib.rs

+8-14
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@ const EXTRA_CHECK_CFGS: &[(Option<Mode>, &'static str, Option<&[&'static str]>)]
203203
(None, "bootstrap", None),
204204
(Some(Mode::Rustc), "parallel_compiler", None),
205205
(Some(Mode::ToolRustc), "parallel_compiler", None),
206-
(Some(Mode::ToolRustc), "emulate_second_only_system", None),
207206
(Some(Mode::Codegen), "parallel_compiler", None),
208207
(Some(Mode::Std), "stdarch_intel_sde", None),
209208
(Some(Mode::Std), "no_fp_fmt_parse", None),
@@ -214,18 +213,9 @@ const EXTRA_CHECK_CFGS: &[(Option<Mode>, &'static str, Option<&[&'static str]>)]
214213
(Some(Mode::Std), "backtrace_in_libstd", None),
215214
/* Extra values not defined in the built-in targets yet, but used in std */
216215
(Some(Mode::Std), "target_env", Some(&["libnx"])),
217-
(Some(Mode::Std), "target_os", Some(&["watchos"])),
218-
(
219-
Some(Mode::Std),
220-
"target_arch",
221-
Some(&["asmjs", "spirv", "nvptx", "nvptx64", "le32", "xtensa"]),
222-
),
216+
// (Some(Mode::Std), "target_os", Some(&[])),
217+
(Some(Mode::Std), "target_arch", Some(&["asmjs", "spirv", "nvptx", "xtensa"])),
223218
/* Extra names used by dependencies */
224-
// FIXME: Used by rustfmt is their test but is invalid (neither cargo nor bootstrap ever set
225-
// this config) should probably by removed or use a allow attribute.
226-
(Some(Mode::ToolRustc), "release", None),
227-
// FIXME: Used by stdarch in their test, should use a allow attribute instead.
228-
(Some(Mode::Std), "dont_compile_me", None),
229219
// FIXME: Used by serde_json, but we should not be triggering on external dependencies.
230220
(Some(Mode::Rustc), "no_btreemap_remove_entry", None),
231221
(Some(Mode::ToolRustc), "no_btreemap_remove_entry", None),
@@ -235,8 +225,12 @@ const EXTRA_CHECK_CFGS: &[(Option<Mode>, &'static str, Option<&[&'static str]>)]
235225
// FIXME: Used by proc-macro2, but we should not be triggering on external dependencies.
236226
(Some(Mode::Rustc), "span_locations", None),
237227
(Some(Mode::ToolRustc), "span_locations", None),
238-
// Can be passed in RUSTFLAGS to prevent direct syscalls in rustix.
239-
(None, "rustix_use_libc", None),
228+
// FIXME: Used by rustix, but we should not be triggering on external dependencies.
229+
(Some(Mode::Rustc), "rustix_use_libc", None),
230+
(Some(Mode::ToolRustc), "rustix_use_libc", None),
231+
// FIXME: Used by filetime, but we should not be triggering on external dependencies.
232+
(Some(Mode::Rustc), "emulate_second_only_system", None),
233+
(Some(Mode::ToolRustc), "emulate_second_only_system", None),
240234
];
241235

242236
/// A structure representing a Rust compiler.

0 commit comments

Comments
 (0)