Diff
Modified: trunk/Source/WebKit/chromium/ChangeLog (93938 => 93939)
--- trunk/Source/WebKit/chromium/ChangeLog 2011-08-27 18:09:08 UTC (rev 93938)
+++ trunk/Source/WebKit/chromium/ChangeLog 2011-08-27 18:57:16 UTC (rev 93939)
@@ -1,3 +1,13 @@
+2011-08-27 Peter Beverloo <[email protected]>
+
+ Teach the update and build scripts how to handle dependencies
+ and cross-compiling rules for the Chromium port on OS(ANDROID).
+ https://bugs.webkit.org/show_bug.cgi?id=66687
+
+ Reviewed by Adam Barth.
+
+ * gyp_webkit:
+
2011-08-26 Iain Merrick <[email protected]>
[chromium] Add MockWebGraphicsContext3D, for compositor unit testing
Modified: trunk/Source/WebKit/chromium/gyp_webkit (93938 => 93939)
--- trunk/Source/WebKit/chromium/gyp_webkit 2011-08-27 18:09:08 UTC (rev 93938)
+++ trunk/Source/WebKit/chromium/gyp_webkit 2011-08-27 18:57:16 UTC (rev 93939)
@@ -90,7 +90,7 @@
args.append('--no-circular-check')
# On linux, we want gyp to output a makefile (default is scons).
- if sys.platform.startswith('linux'):
+ if sys.platform.startswith('linux') or 'GYP_ANDROID_BUILD' in os.environ:
args.extend(['-fmake',
'--suffix=.chromium',
'--toplevel-dir=../../..',
Modified: trunk/Tools/ChangeLog (93938 => 93939)
--- trunk/Tools/ChangeLog 2011-08-27 18:09:08 UTC (rev 93938)
+++ trunk/Tools/ChangeLog 2011-08-27 18:57:16 UTC (rev 93939)
@@ -1,3 +1,21 @@
+2011-08-27 Peter Beverloo <[email protected]>
+
+ Teach the update and build scripts how to handle dependencies
+ and cross-compiling rules for the Chromium port on OS(ANDROID).
+ https://bugs.webkit.org/show_bug.cgi?id=66687
+
+ Reviewed by Adam Barth.
+
+ * Scripts/build-webkit:
+ * Scripts/update-webkit:
+ * Scripts/update-webkit-chromium:
+ * Scripts/webkitdirs.pm:
+ (argumentsForConfiguration):
+ (isChromium):
+ (isChromiumAndroid):
+ (determineIsChromiumAndroid):
+ (buildChromium):
+
2011-08-26 Adam Barth <[email protected]>
garden-o-matic should let me know that I need to run the local server
Modified: trunk/Tools/Scripts/build-webkit (93938 => 93939)
--- trunk/Tools/Scripts/build-webkit 2011-08-27 18:09:08 UTC (rev 93938)
+++ trunk/Tools/Scripts/build-webkit 2011-08-27 18:57:16 UTC (rev 93939)
@@ -365,6 +365,7 @@
--dsym Change debugging format to dwarf-with-dsym (Mac only)
--chromium Build the Chromium port on Mac/Win/Linux
+ --chromium-android Build the Chromium port on Android
--efl Build the EFL port
--gtk Build the GTK+ port
--qt Build the Qt port
Modified: trunk/Tools/Scripts/update-webkit (93938 => 93939)
--- trunk/Tools/Scripts/update-webkit 2011-08-27 18:09:08 UTC (rev 93938)
+++ trunk/Tools/Scripts/update-webkit 2011-08-27 18:57:16 UTC (rev 93939)
@@ -49,6 +49,7 @@
my $useGYP = 0;
determineIsChromium();
+determineIsChromiumAndroid();
determineIsWinCairo();
@@ -63,11 +64,12 @@
if (!$getOptionsResult || $showHelp) {
print STDERR <<__END__;
Usage: @{[ basename($0) ]} [options]
- --chromium also update dependencies of the chromium port
- -h|--help show the help message
- -q|--quiet pass -q to svn update for quiet updates
- --gyp generate project files from gyp after update
- --wincairo also update dependencies of the WinCairo port
+ --chromium also update dependencies of the chromium port
+ --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
+ --gyp generate project files from gyp after update
+ --wincairo also update dependencies of the WinCairo port
__END__
exit 1;
}
@@ -97,7 +99,9 @@
rmtree(["WebKit/chromium/Debug", "WebKit/chromium/Release"]);
}
- system("perl", "Tools/Scripts/update-webkit-chromium") == 0 or die $!;
+ my @chromiumUpdateArgs = ("perl", "Tools/Scripts/update-webkit-chromium");
+ push @chromiumUpdateArgs, "--chromium-android" if isChromiumAndroid();
+ system(@chromiumUpdateArgs) == 0 or die $!;
} elsif (isAppleWinWebKit()) {
system("perl", "Tools/Scripts/update-webkit-auxiliary-libs") == 0 or die;
if (isWinCairo()) {
Modified: trunk/Tools/Scripts/update-webkit-chromium (93938 => 93939)
--- trunk/Tools/Scripts/update-webkit-chromium 2011-08-27 18:09:08 UTC (rev 93938)
+++ trunk/Tools/Scripts/update-webkit-chromium 2011-08-27 18:57:16 UTC (rev 93939)
@@ -34,6 +34,8 @@
use lib $FindBin::Bin;
use webkitdirs;
+determineIsChromiumAndroid();
+
chdir("Source/WebKit/chromium") or die $!;
# Find gclient or install it.
@@ -56,6 +58,14 @@
"--spec=solutions=[{'name':'./','url':None}]") == 0 or die $!;
}
+# Set certain gyp settings for the Android build
+if (isChromiumAndroid()) {
+ # FIXME: Add code to automatically download the NDK
+ my $host_os = isLinux() ? "linux" : "mac";
+ $ENV{GYP_DEFINES} = "OS=android host_os=" . $host_os . " target_arch=arm arm_neon=1 armv7=1 arm_thumb=1 linux_fpic=1 use_openssl=1 use_system_libjpeg=0 linux_use_tcmalloc=0";
+ $ENV{GYP_ANDROID_BUILD} = 1;
+}
+
my $force = 0;
GetOptions(
'force' => \$force,
@@ -66,4 +76,5 @@
my @gclientArgs = ($gclientPath, "sync");
push @gclientArgs, "--force" if $force;
push @gclientArgs, "--delete_unversioned_trees" if $force;
+push @gclientArgs, "--deps=unix,android" if isChromiumAndroid();
system(@gclientArgs) == 0 or die $!;
Modified: trunk/Tools/Scripts/webkitdirs.pm (93938 => 93939)
--- trunk/Tools/Scripts/webkitdirs.pm 2011-08-27 18:09:08 UTC (rev 93938)
+++ trunk/Tools/Scripts/webkitdirs.pm 2011-08-27 18:57:16 UTC (rev 93939)
@@ -72,6 +72,7 @@
my $isEfl;
my @wxArgs;
my $isChromium;
+my $isChromiumAndroid;
my $isInspectorFrontend;
my $isWK2;
@@ -284,7 +285,8 @@
push(@args, '--efl') if isEfl();
push(@args, '--wince') if isWinCE();
push(@args, '--wx') if isWx();
- push(@args, '--chromium') if isChromium();
+ push(@args, '--chromium') if isChromium() && !isChromiumAndroid();
+ push(@args, '--chromium-android') if isChromiumAndroid();
push(@args, '--inspector-frontend') if isInspectorFrontend();
return @args;
}
@@ -871,7 +873,8 @@
sub isChromium()
{
determineIsChromium();
- return $isChromium;
+ determineIsChromiumAndroid();
+ return $isChromium || $isChromiumAndroid;
}
sub determineIsChromium()
@@ -880,6 +883,18 @@
$isChromium = checkForArgumentAndRemoveFromARGV("--chromium");
}
+sub isChromiumAndroid()
+{
+ determineIsChromiumAndroid();
+ return $isChromiumAndroid;
+}
+
+sub determineIsChromiumAndroid()
+{
+ return if defined($isChromiumAndroid);
+ $isChromiumAndroid = checkForArgumentAndRemoveFromARGV("--chromium-android");
+}
+
sub isWinCairo()
{
determineIsWinCairo();
@@ -1891,7 +1906,23 @@
}
my $result = 1;
- if (isDarwin()) {
+ if (isChromiumAndroid()) {
+ # Building Chromium for Android needs to cross-compile using the
+ # Toolchains supplied by the Android NDK.
+ my $ndkBaseDir = sourceDir() . "/Source/WebKit/chromium/third_party/android-ndk-r6";
+ my $platform = isDarwin() ? "darwin-x86" : "linux-x86";
+
+ my $toolchainBase = $ndkBaseDir . "/toolchains/arm-linux-androideabi-4.4.3/prebuilt/" . $platform . "/bin/arm-linux-androideabi-";
+
+ $ENV{AR} = $toolchainBase . "ar";
+ $ENV{CC} = $toolchainBase . "gcc";
+ $ENV{CXX} = $toolchainBase . "g++";
+ $ENV{LINK} = $toolchainBase . "gcc";
+ $ENV{RANLIB} = $toolchainBase . "ranlib";
+ $ENV{STRIP} = $toolchainBase . "strip";
+
+ $result = buildChromiumMakefile("all", $clean);
+ } elsif (isDarwin()) {
# Mac build - builds the root xcode project.
$result = buildXCodeProject("Source/WebKit/chromium/WebKit", $clean, "-configuration", configuration(), @options);
} elsif (isCygwin() || isWindows()) {