diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-06-16 15:08:43 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-16 15:08:43 +0200 |
| commit | 66a1da38d0d8a8ae1d6667c30126d19ab545ea83 (patch) | |
| tree | 5e6c8514d6c5414d44a5a8e1c9a3415f0ae48fe3 | |
| parent | 94105c2da3d9375ac9978eb835ef5e0af4a144f3 (diff) | |
| parent | b34a41797248fb36dd690d6013a9a238391437d0 (diff) | |
| download | rust-66a1da38d0d8a8ae1d6667c30126d19ab545ea83.tar.gz rust-66a1da38d0d8a8ae1d6667c30126d19ab545ea83.zip | |
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`.
| -rw-r--r-- | src/bootstrap/flags.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bootstrap/flags.rs b/src/bootstrap/flags.rs index cfaa43f3970..37261153574 100644 --- a/src/bootstrap/flags.rs +++ b/src/bootstrap/flags.rs @@ -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( "", |
