Title: [228106] trunk/Tools
Revision
228106
Author
[email protected]
Date
2018-02-05 11:15:10 -0800 (Mon, 05 Feb 2018)

Log Message

[Win] Enable multi CPU building on MSBuild.
https://bugs.webkit.org/show_bug.cgi?id=182446

Compiling itself already uses multi cores, but other stuff is still on single core.
This patch enables that by passing an argument to MSBuild.exe.

Patch by Basuke Suzuki <[email protected]> on 2018-02-05
Reviewed by Alex Christensen.

* Scripts/webkitdirs.pm:
(determineNumberOfCPUs):
(buildVisualStudioProject):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (228105 => 228106)


--- trunk/Tools/ChangeLog	2018-02-05 19:02:06 UTC (rev 228105)
+++ trunk/Tools/ChangeLog	2018-02-05 19:15:10 UTC (rev 228106)
@@ -1,3 +1,17 @@
+2018-02-05  Basuke Suzuki  <[email protected]>
+
+        [Win] Enable multi CPU building on MSBuild.
+        https://bugs.webkit.org/show_bug.cgi?id=182446
+
+        Compiling itself already uses multi cores, but other stuff is still on single core.
+        This patch enables that by passing an argument to MSBuild.exe.
+
+        Reviewed by Alex Christensen.
+
+        * Scripts/webkitdirs.pm:
+        (determineNumberOfCPUs):
+        (buildVisualStudioProject):
+
 2018-02-05  Alicia Boya GarcĂ­a  <[email protected]>
 
         Fix bug in MediaTime comparison for negative values with different scale.

Modified: trunk/Tools/Scripts/webkitdirs.pm (228105 => 228106)


--- trunk/Tools/Scripts/webkitdirs.pm	2018-02-05 19:02:06 UTC (rev 228105)
+++ trunk/Tools/Scripts/webkitdirs.pm	2018-02-05 19:15:10 UTC (rev 228106)
@@ -434,6 +434,8 @@
         $numberOfCPUs = `ls /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor | wc -w`;
     } elsif (isDarwin() || isBSD()) {
         chomp($numberOfCPUs = `sysctl -n hw.ncpu`);
+    } else {
+        $numberOfCPUs = 1;
     }
 }
 
@@ -1917,7 +1919,9 @@
     chomp($warningLogFile = `cygpath -w "$warningLogFile"`) if isCygwin();
     my $warningLogging = "/flp1:LogFile=" . $warningLogFile . ";WarningsOnly";
 
-    my @command = ($vcBuildPath, "/verbosity:minimal", $project, $action, $config, $platform, "/fl", $errorLogging, "/fl1", $warningLogging);
+    my $maxCPUCount = '/maxcpucount:' . numberOfCPUs();
+
+    my @command = ($vcBuildPath, "/verbosity:minimal", $project, $action, $config, $platform, "/fl", $errorLogging, "/fl1", $warningLogging, $maxCPUCount);
     print join(" ", @command), "\n";
     return system @command;
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to