-
Notifications
You must be signed in to change notification settings - Fork 556
how-to-build-and-run.md: fix some text regarding bootstraping #2602
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
base: main
Are you sure you want to change the base?
Conversation
src/building/how-to-build-and-run.md
Outdated
This produces the stage1 compiler. | ||
|
||
To build `rustc` with the in-tree `std`, use this command instead: | ||
To build the in-tree `std`, use this command instead: |
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.
Nit: I would say to build the in-tree compiler and std. Which is exactly why in practice this is usually more useful for contributors if they actually need to produce std-using programs or run tests.
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 probably also would use ./x build library
, I think I never used ./x build std
myself. Though I guess I might even drop ./x build rustc
or ./x build compiler
for that matter, and only say something like:
./x build library
-> produce stage 1 rustc/std toolchain./x build library --keep-stage-std=1
-> if there's only compiler changes that do not need to rebuild std
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 prefer rustc/std over compiler/library since the latter feels less precise, especially since they are also directory names. Am also concerned of expanding this intro section more (and it already does point to --keep
section, though I see now it was removed 257e73f).
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 don't think "std" is an alias for "library". std will not build proc_macro and test, for example.
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.
./x build library --keep-stage-std=1
-> if there's only compiler changes that do not need to rebuild std
why would you not ./x build compiler
for this
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.
Because that only builds the compiler. If you want to run ui tests or build any non-no_std
programs, having only the compiler is approximately useless. Or do you mean not using --keep-stage-std
+ ./x build library
?
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.
it looked like ./x build compiler
is equivalent to ./x build library --keep-stage-std 1
, but maybe not
34489d1
to
9d1e802
Compare
@jieyouxu made further changes which include your suggestion (and that of @Noratrieb) |
See https://github.com/rust-lang/rustc-dev-guide/pull/2599/files#r2403841373
r? @jieyouxu