Skip to content

Conversation

tshepang
Copy link
Member

@tshepang tshepang commented Oct 4, 2025

@rustbot rustbot added the S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content label Oct 4, 2025
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:
Copy link
Member

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.

Copy link
Member

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

Copy link
Member Author

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

Copy link
Member

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.

Copy link
Member Author

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

Copy link
Member

@jieyouxu jieyouxu Oct 7, 2025

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?

Copy link
Member Author

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

@tshepang
Copy link
Member Author

tshepang commented Oct 7, 2025

@jieyouxu made further changes which include your suggestion (and that of @Noratrieb)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants