Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set --cfg bootstrap for rustdoc when building docs with bootstrap compiler #71455

Closed
ecstatic-morse opened this issue Apr 23, 2020 · 1 comment · Fixed by #71458
Closed

Set --cfg bootstrap for rustdoc when building docs with bootstrap compiler #71455

ecstatic-morse opened this issue Apr 23, 2020 · 1 comment · Fixed by #71458
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@ecstatic-morse
Copy link
Contributor

ecstatic-morse commented Apr 23, 2020

Currently, ./x.py doc --stage 0 src/libstd fails after running into some #[cfg(not(bootstrap))] stuff.

I had to do this manually via RUSTDOCFLAGS, but I think this should be the default, no?

@ecstatic-morse ecstatic-morse added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. C-enhancement Category: An issue proposing an enhancement or a PR with one. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Apr 23, 2020
@Mark-Simulacrum
Copy link
Member

Yeah, this seems reasonable. I suspect this is just another thing where "stage 0" for most things isn't really natively supported due to lack of testing (in CI, locally, etc.).

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Apr 23, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
…=Mark-Simulacrum

Set `--cfg bootstrap` for stage0 rustdoc

Resolves rust-lang#71455.

With this patch, running `./x.py doc --stage 0 src/libstd` with a clean `build` dir successfully outputs docs for `core`, `alloc` and `std` in under a minute. This kind of turnaround for viewing small changes to the standard library documentation is quite nice, and I think we should endeavour to keep it working. I'm not sure how involved that would be though.

r? @Mark-Simulacrum
@bors bors closed this as completed in a58b1ed Apr 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants