Title: [222364] trunk/Tools
Revision
222364
Author
[email protected]
Date
2017-09-21 16:30:27 -0700 (Thu, 21 Sep 2017)

Log Message

Use 'ninja' from the SDK if it exists
https://bugs.webkit.org/show_bug.cgi?id=177330

Reviewed by Alex Christensen.

* Scripts/webkitdirs.pm:
(canUseNinja):
Check for ninja with xcrun in addition to commandExists() for Cocoa platforms.

(generateBuildSystemFromCMakeProject):
(canUseNinjaGenerator): Deleted.
Remove canUseNinjaGenerator; as noted in bug 177057, the Ninja generator
is available in all versions of CMake supported by WebKit.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (222363 => 222364)


--- trunk/Tools/ChangeLog	2017-09-21 23:10:33 UTC (rev 222363)
+++ trunk/Tools/ChangeLog	2017-09-21 23:30:27 UTC (rev 222364)
@@ -1,3 +1,19 @@
+2017-09-21  Tim Horton  <[email protected]>
+
+        Use 'ninja' from the SDK if it exists
+        https://bugs.webkit.org/show_bug.cgi?id=177330
+
+        Reviewed by Alex Christensen.
+
+        * Scripts/webkitdirs.pm:
+        (canUseNinja):
+        Check for ninja with xcrun in addition to commandExists() for Cocoa platforms.
+
+        (generateBuildSystemFromCMakeProject):
+        (canUseNinjaGenerator): Deleted.
+        Remove canUseNinjaGenerator; as noted in bug 177057, the Ninja generator
+        is available in all versions of CMake supported by WebKit.
+
 2017-09-21  Chris Dumez  <[email protected]>
 
         Regression(r222308): new API tests are failing for !NETWORK_SESSION

Modified: trunk/Tools/Scripts/webkitdirs.pm (222363 => 222364)


--- trunk/Tools/Scripts/webkitdirs.pm	2017-09-21 23:10:33 UTC (rev 222363)
+++ trunk/Tools/Scripts/webkitdirs.pm	2017-09-21 23:30:27 UTC (rev 222364)
@@ -2000,17 +2000,17 @@
         return 0;
     }
 
+    if (isAppleCocoaWebKit()) {
+        my $devnull = File::Spec->devnull();
+        if (exitStatus(system("xcrun -find ninja >$devnull 2>&1")) == 0) {
+            return 1;
+        }
+    }
+
     # Test both ninja and ninja-build. Fedora uses ninja-build and has patched CMake to also call ninja-build.
     return commandExists("ninja") || commandExists("ninja-build");
 }
 
-sub canUseNinjaGenerator(@)
-{
-    # Check that a Ninja generator is installed
-    my $devnull = File::Spec->devnull();
-    return exitStatus(system("cmake -N -G Ninja >$devnull 2>&1")) == 0;
-}
-
 sub canUseEclipseNinjaGenerator(@)
 {
     # Check that eclipse and eclipse Ninja generator is installed
@@ -2041,7 +2041,7 @@
     chdir($buildPath) or die;
 
     # We try to be smart about when to rerun cmake, so that we can have faster incremental builds.
-    my $willUseNinja = canUseNinja() && canUseNinjaGenerator();
+    my $willUseNinja = canUseNinja();
     if (-e cmakeCachePath() && -e cmakeGeneratedBuildfile($willUseNinja)) {
         return 0;
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to