Rollup merge of #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`.
This commit is contained in:
Dylan DPC 2020-06-16 15:08:43 +02:00 committed by GitHub
commit 66a1da38d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -149,7 +149,12 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`",
"N",
);
opts.optopt("", "src", "path to the root of the rust checkout", "DIR");
opts.optopt("j", "jobs", "number of jobs to run in parallel", "JOBS");
let j_msg = format!(
"number of jobs to run in parallel; \
defaults to {} (this host's logical CPU count)",
num_cpus::get()
);
opts.optopt("j", "jobs", &j_msg, "JOBS");
opts.optflag("h", "help", "print this help message");
opts.optopt(
"",