Skip to content

Commit 60ada7a

Browse files
committed
Temporarily make the test cfg a well known bootstrap cfg
1 parent 17f66be commit 60ada7a

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/bootstrap/src/core/builder.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1679,6 +1679,8 @@ impl<'a> Builder<'a> {
16791679
// get warnings about it being unexpected.
16801680
hostflags.arg("-Zunstable-options");
16811681
hostflags.arg("--check-cfg=cfg(bootstrap)");
1682+
// #[cfg(bootstrap)]
1683+
hostflags.arg("--check-cfg=cfg(test)");
16821684

16831685
// FIXME: It might be better to use the same value for both `RUSTFLAGS` and `RUSTDOCFLAGS`,
16841686
// but this breaks CI. At the very least, stage0 `rustdoc` needs `--cfg bootstrap`. See

src/bootstrap/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ const LLD_FILE_NAMES: &[&str] = &["ld.lld", "ld64.lld", "lld-link", "wasm-ld"];
7777
#[allow(clippy::type_complexity)] // It's fine for hard-coded list and type is explained above.
7878
const EXTRA_CHECK_CFGS: &[(Option<Mode>, &str, Option<&[&'static str]>)] = &[
7979
(None, "bootstrap", None),
80+
// #[cfg(bootstrap)] to be removed when Cargo is updated
81+
(None, "test", None),
8082
(Some(Mode::Rustc), "llvm_enzyme", None),
8183
(Some(Mode::Codegen), "llvm_enzyme", None),
8284
(Some(Mode::ToolRustc), "llvm_enzyme", None),

0 commit comments

Comments
 (0)