Skip to content

Commit a415fa4

Browse files
authored
Rollup merge of rust-lang#73380 - pnkfelix:make-bootstrap-help-print-num-cpus, r=Mark-Simulacrum
Add more info to `x.py build --help` on default value for `-j JOBS`.
2 parents 18b046f + b34a417 commit a415fa4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/bootstrap/flags.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,12 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`",
149149
"N",
150150
);
151151
opts.optopt("", "src", "path to the root of the rust checkout", "DIR");
152-
opts.optopt("j", "jobs", "number of jobs to run in parallel", "JOBS");
152+
let j_msg = format!(
153+
"number of jobs to run in parallel; \
154+
defaults to {} (this host's logical CPU count)",
155+
num_cpus::get()
156+
);
157+
opts.optopt("j", "jobs", &j_msg, "JOBS");
153158
opts.optflag("h", "help", "print this help message");
154159
opts.optopt(
155160
"",

0 commit comments

Comments
 (0)