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

Update rustdoc build instructions #1917

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/rustdoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ does is call the `main()` that's in this crate's `lib.rs`, though.)
* Run `./x setup tools` before getting started. This will configure `x`
with nice settings for developing rustdoc and other tools, including
downloading a copy of rustc rather than building it.
* Use `./x check src/tools/rustdoc` to quickly check for compile errors.
* Use `./x build` to make a usable
* Use `./x check rustdoc` to quickly check for compile errors.
* Use `./x build library rustdoc` to make a usable
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I always use ./x.py build --stage 1 -j8 for it to work for me, even now. Strange...

Copy link
Member Author

@fmease fmease Feb 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, you're building rustc before building rustdoc. I however typically build a stage2 rustdoc with a downloaded rustc (if unchanged) to save compute power & time. This is the default for profile tools.

Copy link
Member Author

@fmease fmease Feb 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So what I'm saying is that anyone who also builds a (stage2) rustdoc now needs to build the sysroot explicitly since some time ago...

Copy link
Member Author

@fmease fmease Feb 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...and this document assumes that you're building a stage2 rustdoc due to the ./x setup tools step a few lines further up, so the current dev-guide entry is indeed incorrect / outdated.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth splitting the section into two parts (one for stage 1 and the other for stage 2).

rustdoc you can run on other projects.
* Add `library/test` to be able to use `rustdoc --test`.
* Run `rustup toolchain link stage2 build/host/stage2` to add a
Expand Down