Closed meermanr closed 1 year ago
Please submit a PR. Even with your rubbish ruby skills I'm sure you can replace 4 with nproc :-)
You can actually just omit the -j
flag entirely. brew
adds the appropriate -j
flag to MAKEFLAGS
during the build. By default, this is the number of available processors, but users can customise this with HOMEBREW_MAKE_JOBS
.
Minor nuisance, but I noticed that running
would seemingly "stall" after logging:
... because it was only using 4 threads of compilation. I was suspicious that it was stuck because there was no further output and my CPU monitoring didn't show high usage.
Can I suggest using
$(nproc)
to detect how many threads are available, and then building with that number?On my system, MacBook Pro 16" (Intel) late-2018,
nproc
returns16
.My Ruby skills are rubbish or I'd be brave enough to draft a pull request...