A pull request Add `--keep-stage-std` to `x.py` for keeping only standard library artifacts by ecstatic-morse · Pull Request #77120 · rust-lang/rust · GitHub introduces an option --keep-stage-std for bootstrapping (./x), but it does not provide any meaningful action, but it is just another syntactic bloat of --keep-stage option.
As you can see in the pull request, it pipes the option --keep-stage-std value to config.keep_stage_std and flags.keep_stage_std, but I cannot find any unique functionality of config.keep_stage_std value compared to config.keep_stage.
I think keeping this option is unnecessary. Am I missing something?
Reference: Following is the only part I found where config.keep_stage_std value used:
EDIT:
I discovered another logic that distinguishes keep_stage and keep_stage_std:
EDIT: changed the title from "Bootstrap option --keep-stage-std is meaningless" to "Bootstrap warning "Use --keep-stage-std ..." persists even when the option is used". I'm rethinking whether the option is actually meaningless. Sorry for the confusion. ![]()
From my understanding:
keep_stagecopies third party objects andcopy_self_contained_objects, skipping the compiler buildkeep_stage_stdalso copies these objects but doesn't skip the compiler build.
I apologize for my earlier mistake. Let's discuss this option further. My initial misunderstanding and post on this forum were prompted by a persistent warning message from the bootstrapping script ./x. It shows "WARNING: Use --keep-stage-std if you want to rebuild the compiler when it changes", even if I use multiple --keep-stage-std options like ./x build compiler --keep-stage 0 --keep-stage 1 --keep-stage-std 0 --keep-stage-std 1. After researching on GitHub, I realized that this warning only depends on the keep_stage configuration, not the presense of keep_stage_std.
I find this rigid method of showing warning messages to be confusing and not straightforward.