Title: [222538] trunk/Tools
Revision
222538
Author
[email protected]
Date
2017-09-26 18:00:31 -0700 (Tue, 26 Sep 2017)

Log Message

Make it possible to easily get verbose ninja output from build-webkit
https://bugs.webkit.org/show_bug.cgi?id=177511

Reviewed by Sam Weinig.

* Scripts/build-webkit:
Add a -v/--verbose argument to build-webkit, which sets the environment
variable VERBOSE=1, which buildCMakeGeneratedProject already checks.

* Scripts/webkitdirs.pm:
(buildCMakeGeneratedProject):
Add ninja verbosity arguments to @makeArgs, which are appended
after the -- and thus handed to ninja; the previous implementation
(appending to @args) would only work if @makeArgs was non-empty and thus
the -- was included.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (222537 => 222538)


--- trunk/Tools/ChangeLog	2017-09-27 00:37:59 UTC (rev 222537)
+++ trunk/Tools/ChangeLog	2017-09-27 01:00:31 UTC (rev 222538)
@@ -1,3 +1,21 @@
+2017-09-26  Tim Horton  <[email protected]>
+
+        Make it possible to easily get verbose ninja output from build-webkit
+        https://bugs.webkit.org/show_bug.cgi?id=177511
+
+        Reviewed by Sam Weinig.
+
+        * Scripts/build-webkit:
+        Add a -v/--verbose argument to build-webkit, which sets the environment
+        variable VERBOSE=1, which buildCMakeGeneratedProject already checks.
+
+        * Scripts/webkitdirs.pm:
+        (buildCMakeGeneratedProject):
+        Add ninja verbosity arguments to @makeArgs, which are appended
+        after the -- and thus handed to ninja; the previous implementation
+        (appending to @args) would only work if @makeArgs was non-empty and thus
+        the -- was included.
+
 2017-09-26  Said Abou-Hallawa  <[email protected]>
 
         Followup (r222427): SynchronizedFixedQueue should not have a public constructor

Modified: trunk/Tools/Scripts/build-webkit (222537 => 222538)


--- trunk/Tools/Scripts/build-webkit	2017-09-27 00:37:59 UTC (rev 222537)
+++ trunk/Tools/Scripts/build-webkit	2017-09-27 01:00:31 UTC (rev 222538)
@@ -51,6 +51,7 @@
 chdirWebKit();
 
 my $showHelp = 0;
+my $verbose = 0;
 my $clean = 0;
 my $defaultCMakeFeatures = 0;
 my $minimal = 0;
@@ -88,6 +89,7 @@
 my $usage = <<EOF;
 Usage: $programName [options] [options to pass to build system]
   --help                            Show this help message
+  --verbose                         Show verbose build output
   --clean                           Cleanup the build directory
   --generate-project-only           Only generate project files
   --debug                           Compile with Debug configuration
@@ -119,6 +121,7 @@
 
 my %options = (
     'help' => \$showHelp,
+    'v|verbose' => \$verbose,
     'clean' => \$clean,
     'install-headers=s' => \$installHeaders,
     'install-libs=s' => \$installLibs,
@@ -146,6 +149,8 @@
    exit 1;
 }
 
+$ENV{'VERBOSE'} = 1 if $verbose;
+
 checkRequiredSystemConfig();
 setConfiguration();
 

Modified: trunk/Tools/Scripts/webkitdirs.pm (222537 => 222538)


--- trunk/Tools/Scripts/webkitdirs.pm	2017-09-27 00:37:59 UTC (rev 222537)
+++ trunk/Tools/Scripts/webkitdirs.pm	2017-09-27 01:00:31 UTC (rev 222538)
@@ -2104,7 +2104,7 @@
 
 sub buildCMakeGeneratedProject($)
 {
-    my ($makeArgs) = @_;
+    my (@makeArgs) = @_;
     my $config = configuration();
     my $buildPath = File::Spec->catdir(baseProductDir(), $config);
     if (! -d $buildPath) {
@@ -2111,24 +2111,24 @@
         die "Must call generateBuildSystemFromCMakeProject() before building CMake project.";
     }
 
+    if ($ENV{VERBOSE} && canUseNinja()) {
+        push @makeArgs, "-v";
+        push @makeArgs, "-d keeprsp" if (version->parse(determineNinjaVersion()) >= version->parse("1.4.0"));
+    }
+
     my $command = "cmake";
     my @args = ("--build", $buildPath, "--config", $config);
-    push @args, ("--", $makeArgs) if $makeArgs;
+    push @args, ("--", @makeArgs) if @makeArgs;
 
     # GTK and JSCOnly can use a build script to preserve colors and pretty-printing.
     if ((isGtk() || isJSCOnly()) && -e "$buildPath/build.sh") {
         chdir "$buildPath" or die;
         $command = "$buildPath/build.sh";
-        @args = ($makeArgs);
+        @args = (@makeArgs);
     }
 
-    if ($ENV{VERBOSE} && canUseNinja()) {
-        push @args, "-v";
-        push @args, "-d keeprsp" if (version->parse(determineNinjaVersion()) >= version->parse("1.4.0"));
-    }
-
     # We call system("cmake @args") instead of system("cmake", @args) so that @args is
-    # parsed for shell metacharacters. In particular, $makeArgs may contain such metacharacters.
+    # parsed for shell metacharacters. In particular, @makeArgs may contain such metacharacters.
     my $wrapper = join(" ", wrapperPrefixIfNeeded()) . " ";
     return systemVerbose($wrapper . "$command @args");
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to