[chromium] detect num processors to pass to make -j on Linux
Created attachment 55523 [details] Patch
Since evan knows perl, maybe he can review? The previous code was hard coded to use -j4.
This looks fine to me. I ran it by a perl-hacker friend and he suggested the following. Note that if the grep fails for some reason in your original code your numCpus ends up being 0, which might be bad. my $numCpus = (grep /processor/, `cat /proc/cpuinfox`) || 1; In list context, `` splits on lines so the grep works linewise, and then when you stuff the list that grep returns into scalar context (numCpus) it gets the length of the list. Perl is so awesome in a scary sort of way! Your original code LGTM as well.
Created attachment 55620 [details] Patch
Comment on attachment 55620 [details] Patch Updated to use perl's grep and to have a fallback in case of failure.
Comment on attachment 55620 [details] Patch Clearing flags on attachment: 55620 Committed r59201: <http://trac.webkit.org/changeset/59201>
All reviewed patches have been landed. Closing bug.