Diff
Modified: trunk/Source/WebKit/chromium/ChangeLog (106194 => 106195)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-01-28 21:41:18 UTC (rev 106194)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-01-28 23:43:30 UTC (rev 106195)
@@ -1,3 +1,12 @@
+2012-01-28 Nico Weber <[email protected]>
+
+ [chromium] Add support for building standalone webkit/chromium checkouts with ninja.
+ https://bugs.webkit.org/show_bug.cgi?id=77243
+
+ Reviewed by Adam Barth.
+
+ * gyp_webkit:
+
2012-01-27 Jeff Timanus <[email protected]>
[chromium] Increase the size of the Ganesh texture cache to prevent performance problems on advanced Canvas2D pages.
Modified: trunk/Source/WebKit/chromium/gyp_webkit (106194 => 106195)
--- trunk/Source/WebKit/chromium/gyp_webkit 2012-01-28 21:41:18 UTC (rev 106194)
+++ trunk/Source/WebKit/chromium/gyp_webkit 2012-01-28 23:43:30 UTC (rev 106195)
@@ -102,11 +102,12 @@
if sys.platform not in ('darwin',):
args.append('--no-circular-check')
- # On linux, we want gyp to output a makefile (default is scons).
- if (sys.platform.startswith('linux') or
+ generators = os.environ.get('GYP_GENERATORS', '')
+ if 'ninja' in generators:
+ args.extend([ '--toplevel-dir=../../..' ])
+ elif (sys.platform.startswith('linux') or
'WEBKIT_ANDROID_BUILD' in os.environ or
- (sys.platform == 'darwin' and
- os.environ.get('GYP_GENERATORS', '').find('make') != -1)):
+ (sys.platform == 'darwin' and 'make' in generators)):
args.extend(['-fmake',
'--suffix=.chromium',
'--toplevel-dir=../../..',
Modified: trunk/Tools/ChangeLog (106194 => 106195)
--- trunk/Tools/ChangeLog 2012-01-28 21:41:18 UTC (rev 106194)
+++ trunk/Tools/ChangeLog 2012-01-28 23:43:30 UTC (rev 106195)
@@ -1,3 +1,17 @@
+2012-01-28 Nico Weber <[email protected]>
+
+ [chromium] Add support for building standalone webkit/chromium checkouts with ninja.
+ https://bugs.webkit.org/show_bug.cgi?id=77243
+
+ Reviewed by Adam Barth.
+
+ * Scripts/update-webkit:
+ * Scripts/webkitdirs.pm:
+ (isChromiumNinja):
+ (determineIsChromiumNinja):
+ (buildChromiumNinja):
+ (buildChromium):
+
2012-01-27 Kentaro Hara <[email protected]>
The cpp parser of prepare-ChangeLog treats if(...) {} as a method
Modified: trunk/Tools/Scripts/update-webkit (106194 => 106195)
--- trunk/Tools/Scripts/update-webkit 2012-01-28 21:41:18 UTC (rev 106194)
+++ trunk/Tools/Scripts/update-webkit 2012-01-28 23:43:30 UTC (rev 106195)
@@ -48,6 +48,7 @@
my $showHelp;
my $useGYP = 0;
my $useMake = 0;
+my $useNinja = 0;
determineIsChromium();
determineIsChromiumAndroid();
@@ -61,6 +62,7 @@
'q|quiet' => \$quiet,
'gyp' => \$useGYP,
'make' => \$useMake,
+ 'ninja' => \$useNinja,
);
if (!$getOptionsResult || $showHelp) {
@@ -68,6 +70,7 @@
Usage: @{[ basename($0) ]} [options]
--chromium also update dependencies of the chromium port
--make generate the Makefile-based build system (Chromium only)
+ --ninja generate the ninja-based build system (Chromium only)
--chromium-android also update dependencies of the chromium port for Android
-h|--help show the help message
-q|--quiet pass -q to svn update for quiet updates
@@ -80,6 +83,9 @@
if ($useMake) {
$ENV{"GYP_GENERATORS"} = "make";
}
+if ($useNinja) {
+ $ENV{"GYP_GENERATORS"} = "ninja";
+}
my $startTime = time();
Modified: trunk/Tools/Scripts/webkitdirs.pm (106194 => 106195)
--- trunk/Tools/Scripts/webkitdirs.pm 2012-01-28 21:41:18 UTC (rev 106194)
+++ trunk/Tools/Scripts/webkitdirs.pm 2012-01-28 23:43:30 UTC (rev 106195)
@@ -95,6 +95,7 @@
my $isChromium;
my $isChromiumAndroid;
my $isChromiumMacMake;
+my $isChromiumNinja;
my $forceChromiumUpdate;
my $isInspectorFrontend;
my $isWK2;
@@ -1139,6 +1140,37 @@
$isChromiumMacMake = isDarwin() && $hasUpToDateMakefile;
}
+sub isChromiumNinja()
+{
+ determineIsChromiumNinja();
+ return $isChromiumNinja;
+}
+
+sub determineIsChromiumNinja()
+{
+ return if defined($isChromiumNinja);
+
+ my $config = configuration();
+
+ my $hasUpToDateNinjabuild = 0;
+ if (-e "out/$config/build.ninja") {
+ my $statNinja = stat("out/$config/build.ninja");
+
+ my $statXcode = 0;
+ if (-e 'Source/WebKit/chromium/WebKit.xcodeproj') {
+ $statXcode = stat('Source/WebKit/chromium/WebKit.xcodeproj')->mtime;
+ }
+
+ my $statMake = 0;
+ if (-e 'Makefile.chromium') {
+ $statXcode = stat('Makefile.chromium')->mtime;
+ }
+
+ $hasUpToDateNinjabuild = $statNinja > $statXcode && $statNinja > $statMake;
+ }
+ $isChromiumNinja = $hasUpToDateNinjabuild;
+}
+
sub forceChromiumUpdate()
{
determineIsChromium();
@@ -2266,6 +2298,19 @@
return system $command;
}
+sub buildChromiumNinja($$@)
+{
+ # rm -rf out requires rerunning gyp, so don't support --clean for now.
+ my ($target, @options) = @_;
+ my $config = configuration();
+ my $command = "";
+
+ $command .= "ninja -C out/$config $target";
+
+ print "$command\n";
+ return system $command;
+}
+
sub buildChromiumVisualStudioProject($$)
{
my ($projectPath, $clean) = @_;
@@ -2316,12 +2361,14 @@
}
my $result = 1;
- if (isDarwin() && !isChromiumAndroid() && !isChromiumMacMake()) {
+ if (isDarwin() && !isChromiumAndroid() && !isChromiumMacMake() && !isChromiumNinja()) {
# Mac build - builds the root xcode project.
$result = buildXCodeProject("Source/WebKit/chromium/All", $clean, "-configuration", configuration(), @options);
} elsif (isCygwin() || isWindows()) {
# Windows build - builds the root visual studio solution.
$result = buildChromiumVisualStudioProject("Source/WebKit/chromium/All.sln", $clean);
+ } elsif (isChromiumNinja()) {
+ $result = buildChromiumNinja("all", $clean, @options);
} elsif (isLinux() || isChromiumAndroid() || isChromiumMacMake()) {
# Linux build - build using make.
$result = buildChromiumMakefile("all", $clean, @options);