Add more info to `x.py build --help` on default value for `-j JOBS`.

This commit is contained in:
Felix S. Klock II 2020-06-15 15:02:57 -04:00
parent ff4a2533a0
commit b34a417972
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(
"",