Skip to content

Commit 006ca9b

Browse files
committed
Auto merge of rust-lang#107080 - Urgau:cleanup-bootstrap-extra-check-cfgs, r=Mark-Simulacrum
bootstrap: cleanup the list of extra check cfgs This PR performs some cleanups on the `EXTRA_CHECK_CFGS` list in bootstrap. - `target_os=watchos`: no longer relevant because there are now proper targets `*-apple-watchos` - `target_arch=nvptx64`: target `nvptx64-nvidia-cuda` makes it useless - `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).
2 parents fba9f33 + a01a540 commit 006ca9b

File tree

4 files changed

+9
-22
lines changed

4 files changed

+9
-22
lines changed

library/std/src/os/fuchsia/raw.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,7 @@ pub type pthread_t = c_ulong;
2424
#[stable(feature = "raw_ext", since = "1.1.0")]
2525
pub use self::arch::{blkcnt_t, blksize_t, ino_t, nlink_t, off_t, stat, time_t};
2626

27-
#[cfg(any(
28-
target_arch = "x86",
29-
target_arch = "le32",
30-
target_arch = "powerpc",
31-
target_arch = "arm"
32-
))]
27+
#[cfg(any(target_arch = "x86", target_arch = "powerpc", target_arch = "arm"))]
3328
mod arch {
3429
use crate::os::raw::{c_long, c_short, c_uint};
3530

library/std/src/os/l4re/raw.rs

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ pub use self::arch::{blkcnt_t, blksize_t, ino_t, nlink_t, off_t, stat, time_t};
2626

2727
#[cfg(any(
2828
target_arch = "x86",
29-
target_arch = "le32",
3029
target_arch = "m68k",
3130
target_arch = "powerpc",
3231
target_arch = "sparc",

library/std/src/os/linux/raw.rs

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ pub use self::arch::{blkcnt_t, blksize_t, ino_t, nlink_t, off_t, stat, time_t};
2626

2727
#[cfg(any(
2828
target_arch = "x86",
29-
target_arch = "le32",
3029
target_arch = "m68k",
3130
target_arch = "powerpc",
3231
target_arch = "sparc",

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)