diff options
| author | bors <bors@rust-lang.org> | 2022-09-17 05:45:28 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-09-17 05:45:28 +0000 |
| commit | 4a12d10bcc4536108efad1613b57f725302c207e (patch) | |
| tree | 42c876d96b40df4493622989df942bdb764097b4 /src/bootstrap | |
| parent | c524c7dd258628f79e590626e8534dceac477c4c (diff) | |
| parent | cafca7d2197e3fbfbd9efe8870fb0fa559e11fb3 (diff) | |
| download | rust-4a12d10bcc4536108efad1613b57f725302c207e.tar.gz rust-4a12d10bcc4536108efad1613b57f725302c207e.zip | |
Auto merge of #101928 - notriddle:rollup-pexhhxe, r=notriddle
Rollup of 8 pull requests Successful merges: - #101340 (Adding Fuchsia zxdb debugging walkthrough to docs) - #101741 (Adding needs-unwind arg to applicable compiler ui tests) - #101782 (Update `symbol_mangling` diagnostics migration) - #101878 (More simple formatting) - #101898 (Remove some unused CSS rules) - #101911 (rustdoc: remove no-op CSS on `.source .content`) - #101914 (rustdoc-json-types: Document that ResolvedPath can also be a union) - #101921 (Pass --cfg=bootstrap for rustdoc for proc_macro crates) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/bin/rustc.rs | 6 | ||||
| -rw-r--r-- | src/bootstrap/bin/rustdoc.rs | 11 |
2 files changed, 13 insertions, 4 deletions
diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs index bd5790d2ea8..e96f8b0d312 100644 --- a/src/bootstrap/bin/rustc.rs +++ b/src/bootstrap/bin/rustc.rs @@ -139,10 +139,8 @@ fn main() { // Cargo doesn't pass RUSTFLAGS to proc_macros: // https://github.com/rust-lang/cargo/issues/4423 // Thus, if we are on stage 0, we explicitly set `--cfg=bootstrap`. - // We also declare that the flag is expected, which is mainly needed for - // later stages so that they don't warn about #[cfg(bootstrap)], - // but enabling it for stage 0 too lets any warnings, if they occur, - // occur more early on, e.g. about #[cfg(bootstrap = "foo")]. + // We also declare that the flag is expected, which we need to do to not + // get warnings about it being unexpected. if stage == "0" { cmd.arg("--cfg=bootstrap"); } diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs index 87c1d22e771..e69cab956c5 100644 --- a/src/bootstrap/bin/rustdoc.rs +++ b/src/bootstrap/bin/rustdoc.rs @@ -11,6 +11,7 @@ include!("../dylib_util.rs"); fn main() { let args = env::args_os().skip(1).collect::<Vec<_>>(); + let stage = env::var("RUSTC_STAGE").expect("RUSTC_STAGE was not set"); let rustdoc = env::var_os("RUSTDOC_REAL").expect("RUSTDOC_REAL was not set"); let libdir = env::var_os("RUSTDOC_LIBDIR").expect("RUSTDOC_LIBDIR was not set"); let sysroot = env::var_os("RUSTC_SYSROOT").expect("RUSTC_SYSROOT was not set"); @@ -62,6 +63,16 @@ fn main() { cmd.arg("-Clink-arg=-Wl,--threads=1"); } } + // Cargo doesn't pass RUSTDOCFLAGS to proc_macros: + // https://github.com/rust-lang/cargo/issues/4423 + // Thus, if we are on stage 0, we explicitly set `--cfg=bootstrap`. + // We also declare that the flag is expected, which we need to do to not + // get warnings about it being unexpected. + if stage == "0" { + cmd.arg("--cfg=bootstrap"); + } + cmd.arg("-Zunstable-options"); + cmd.arg("--check-cfg=values(bootstrap)"); if verbose > 1 { eprintln!( |
