From 713450177c192c47d82db02abf7dedab05f07d41 Mon Sep 17 00:00:00 2001 From: "rgabor@webkit.org" Date: Wed, 22 Feb 2012 18:10:40 +0000 Subject: [PATCH] build-webkit should use environment variable at number of CPU detection on all platform https://bugs.webkit.org/show_bug.cgi?id=79227 Reviewed by Martin Robinson. * Scripts/webkitdirs.pm: (determineNumberOfCPUs): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108513 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Tools/ChangeLog | 11 +++++++++++ Tools/Scripts/webkitdirs.pm | 12 +++++------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/Tools/ChangeLog b/Tools/ChangeLog index 05afaf5..f4eaf87 100644 --- a/Tools/ChangeLog +++ b/Tools/ChangeLog @@ -1,3 +1,14 @@ +2012-02-22 Gabor Rapcsanyi + + build-webkit should use environment variable at number of CPU + detection on all platform + https://bugs.webkit.org/show_bug.cgi?id=79227 + + Reviewed by Martin Robinson. + + * Scripts/webkitdirs.pm: + (determineNumberOfCPUs): + 2012-02-22 Mihnea Ovidenie [Qt] REGRESSION(r108108): It made 3 fast/repaint tests fail diff --git a/Tools/Scripts/webkitdirs.pm b/Tools/Scripts/webkitdirs.pm index abbd41e..bcae94c 100755 --- a/Tools/Scripts/webkitdirs.pm +++ b/Tools/Scripts/webkitdirs.pm @@ -326,7 +326,9 @@ sub determineArchitecture sub determineNumberOfCPUs { return if defined $numberOfCPUs; - if (isLinux()) { + if (defined($ENV{NUMBER_OF_PROCESSORS})) { + $numberOfCPUs = $ENV{NUMBER_OF_PROCESSORS}; + } elsif (isLinux()) { # First try the nproc utility, if it exists. If we get no # results fall back to just interpretting /proc directly. chomp($numberOfCPUs = `nproc 2> /dev/null`); @@ -334,12 +336,8 @@ sub determineNumberOfCPUs $numberOfCPUs = (grep /processor/, `cat /proc/cpuinfo`); } } elsif (isWindows() || isCygwin()) { - if (defined($ENV{NUMBER_OF_PROCESSORS})) { - $numberOfCPUs = $ENV{NUMBER_OF_PROCESSORS}; - } else { - # Assumes cygwin - $numberOfCPUs = `ls /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor | wc -w`; - } + # Assumes cygwin + $numberOfCPUs = `ls /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor | wc -w`; } elsif (isDarwin()) { chomp($numberOfCPUs = `sysctl -n hw.ncpu`); } -- 2.7.4