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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fmease
Copy link
Member

@fmease fmease commented Feb 28, 2024

I don't know when exactly this was changed since I effectively took a break from hacking on rustdoc for a few months until last month. I faintly remember a smaller bootstrap PR that might've affected this.

Basically from what I can tell under profile = "tools", you now need to explicitly build the sysroot together with rustdoc via ./x b library rustdoc whereas before you could just do ./x b. I think this was an intentional change.

A month ago when I came back to rustdoc dev I first thought my build environment was beyond broken, lol.
Through trial-and-error I figured out the aforementioned bootstrap invocation. Note that separate invocations à la ./x b library; ./x b or ./x b library; ./x b rustdoc don't work either, the sysroot still wouldn't be available to rustdoc (at least that's what I remember from my experiments from four weeks ago).

Maybe I've totally missed something and I'm doing it absolutely wrong ^^ and the build instructions from the dev-guide still work for you. If so, please do tell.

cc @GuillaumeGomez, @notriddle, @onur-ozkan

* 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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants