Title: [166058] trunk/Tools
Revision
166058
Author
[email protected]
Date
2014-03-21 03:36:21 -0700 (Fri, 21 Mar 2014)

Log Message

[CMake] Add support for MAX_CPU_LOAD translated to -l in ninja and make
https://bugs.webkit.org/show_bug.cgi?id=130504

Reviewed by Martin Robinson.

* Scripts/build-webkit: Add the maxCPULoad() to the makeArgs in
CMake if not specified.
* Scripts/webkitdirs.pm:
(determineMaxCPULoad): Read MAX_CPU_LOAD as maxCPULoad.
(maxCPULoad): determineMaxCPULoad and return maxCPULoad.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (166057 => 166058)


--- trunk/Tools/ChangeLog	2014-03-21 09:24:08 UTC (rev 166057)
+++ trunk/Tools/ChangeLog	2014-03-21 10:36:21 UTC (rev 166058)
@@ -1,3 +1,16 @@
+2014-03-21  Xabier Rodriguez Calvar  <[email protected]>
+
+        [CMake] Add support for MAX_CPU_LOAD translated to -l in ninja and make
+        https://bugs.webkit.org/show_bug.cgi?id=130504
+
+        Reviewed by Martin Robinson.
+
+        * Scripts/build-webkit: Add the maxCPULoad() to the makeArgs in
+        CMake if not specified.
+        * Scripts/webkitdirs.pm:
+        (determineMaxCPULoad): Read MAX_CPU_LOAD as maxCPULoad.
+        (maxCPULoad): determineMaxCPULoad and return maxCPULoad.
+
 2014-03-21  Andreas Kling  <[email protected]>
 
         RetainPtr API test should use CFArray instead of CFString for testing.

Modified: trunk/Tools/Scripts/build-webkit (166057 => 166058)


--- trunk/Tools/Scripts/build-webkit	2014-03-21 09:24:08 UTC (rev 166057)
+++ trunk/Tools/Scripts/build-webkit	2014-03-21 10:36:21 UTC (rev 166058)
@@ -270,6 +270,8 @@
     # By default we build using all of the available CPUs.
     if (!isWinCE()) {
         $makeArgs .= ($makeArgs ? " " : "") . "-j" . numberOfCPUs() if $makeArgs !~ /-j\s*\d+/;
+        my $maxCPULoad = maxCPULoad() if $makeArgs !~ /-l\s*\d+\.?\d*/;
+        $makeArgs .= " -l" . maxCPULoad() if defined $maxCPULoad;
     }
 
     # We remove CMakeCache to avoid the bots to reuse cached flags when

Modified: trunk/Tools/Scripts/webkitdirs.pm (166057 => 166058)


--- trunk/Tools/Scripts/webkitdirs.pm	2014-03-21 09:24:08 UTC (rev 166057)
+++ trunk/Tools/Scripts/webkitdirs.pm	2014-03-21 10:36:21 UTC (rev 166058)
@@ -78,6 +78,7 @@
 
 my $architecture;
 my $numberOfCPUs;
+my $maxCPULoad;
 my $baseProductDir;
 my @baseProductDirOption;
 my $configuration;
@@ -356,6 +357,14 @@
     }
 }
 
+sub determineMaxCPULoad
+{
+    return if defined $maxCPULoad;
+    if (defined($ENV{MAX_CPU_LOAD})) {
+        $maxCPULoad = $ENV{MAX_CPU_LOAD};
+    }
+}
+
 sub jscPath($)
 {
     my ($productDir) = @_;
@@ -694,6 +703,12 @@
     return $numberOfCPUs;
 }
 
+sub maxCPULoad()
+{
+    determineMaxCPULoad();
+    return $maxCPULoad;
+}
+
 sub setArchitecture
 {
     if (my $arch = shift @_) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to