Title: [108513] trunk/Tools
Revision
108513
Author
[email protected]
Date
2012-02-22 10:10:40 -0800 (Wed, 22 Feb 2012)

Log Message

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):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (108512 => 108513)


--- trunk/Tools/ChangeLog	2012-02-22 17:44:16 UTC (rev 108512)
+++ trunk/Tools/ChangeLog	2012-02-22 18:10:40 UTC (rev 108513)
@@ -1,3 +1,14 @@
+2012-02-22  Gabor Rapcsanyi  <[email protected]>
+
+        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  <[email protected]>
 
         [Qt] REGRESSION(r108108): It made 3 fast/repaint tests fail

Modified: trunk/Tools/Scripts/webkitdirs.pm (108512 => 108513)


--- trunk/Tools/Scripts/webkitdirs.pm	2012-02-22 17:44:16 UTC (rev 108512)
+++ trunk/Tools/Scripts/webkitdirs.pm	2012-02-22 18:10:40 UTC (rev 108513)
@@ -326,7 +326,9 @@
 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 @@
             $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`);
     }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to