-
Notifications
You must be signed in to change notification settings - Fork 476
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
base: master
Are you sure you want to change the base?
Conversation
* 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 |
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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).
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 withrustdoc
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