Diff
Modified: trunk/Tools/ChangeLog (163192 => 163193)
--- trunk/Tools/ChangeLog 2014-01-31 21:17:47 UTC (rev 163192)
+++ trunk/Tools/ChangeLog 2014-01-31 21:26:26 UTC (rev 163193)
@@ -1,3 +1,18 @@
+2014-01-31 Filip Pizlo <[email protected]>
+
+ Allow more flexibility for copy-webkitlibraries-to-product-directory
+ https://bugs.webkit.org/show_bug.cgi?id=128010
+
+ Reviewed by Oliver Hunt.
+
+ It's now the case that copy-webkitlibraries-to-product-directory does nothing by
+ default, but you can tell it to either copy WebKitSystemInterface (--wksi) or LLVM
+ (--llvm). You can also tell it where to get LLVM from.
+
+ * Scripts/build-jsc:
+ * Scripts/build-webkit:
+ * Scripts/copy-webkitlibraries-to-product-directory:
+
2014-01-31 David Farler <[email protected]>
DumpRenderTree iOS fails to link: missing rowHeaders and columnHeaders in AccessibilityUIElement
Modified: trunk/Tools/Scripts/build-jsc (163192 => 163193)
--- trunk/Tools/Scripts/build-jsc 2014-01-31 21:17:47 UTC (rev 163192)
+++ trunk/Tools/Scripts/build-jsc 2014-01-31 21:26:26 UTC (rev 163193)
@@ -40,6 +40,7 @@
my $ftlJIT = 0;
my $forceCLoop = 0;
my $makeArgs = "";
+my $copyLibraries = 1;
my $programName = basename($0);
my $usage = <<EOF;
@@ -47,6 +48,7 @@
--help Show this help message
--[no-]coverage Toggle code coverage support (default: $coverageSupport)
--[no-]ftl-jit Toggle FTL JIT support (default: $ftlJIT)
+ --[no-]copy-libraries Toggle whether to copy libraries (default: $copyLibraries)
--cloop Use C Loop interpreter (default: $forceCLoop)
--makeargs=<arguments> Optional Makefile flags
EOF
@@ -89,12 +91,14 @@
if ($forceCLoop) {
push @options, "ENABLE_LLINT_C_LOOP=ENABLE_LLINT_C_LOOP";
}
- my @copyLibrariesArgs = ("perl", "Tools/Scripts/copy-webkitlibraries-to-product-directory");
- if ($ftlJIT) {
- push @copyLibrariesArgs, "--ftl-jit";
+ if ($copyLibraries) {
+ my @copyLibrariesArgs = ("perl", "Tools/Scripts/copy-webkitlibraries-to-product-directory");
+ if ($ftlJIT) {
+ push @copyLibrariesArgs, "--llvm";
+ }
+ push @copyLibrariesArgs, productDir();
+ (system(@copyLibrariesArgs) == 0) or die;
}
- push @copyLibrariesArgs, productDir();
- (system(@copyLibrariesArgs) == 0) or die;
}
sub buildMyProject
Modified: trunk/Tools/Scripts/build-webkit (163192 => 163193)
--- trunk/Tools/Scripts/build-webkit 2014-01-31 21:17:47 UTC (rev 163192)
+++ trunk/Tools/Scripts/build-webkit 2014-01-31 21:26:26 UTC (rev 163193)
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w
-# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
+# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Apple Inc. All rights reserved.
# Copyright (C) 2009 Google Inc. All rights reserved.
# Copyright (C) 2010 moiji-mobile.com All rights reserved.
# Copyright (C) 2011 Research In Motion Limited. All rights reserved.
@@ -216,11 +216,12 @@
unshift @projects, ("Source/WebInspectorUI");
# Copy library and header from WebKitLibraries to a findable place in the product directory.
- my @copyLibrariesArgs = ("perl", "Tools/Scripts/copy-webkitlibraries-to-product-directory");
+ my @copyLibrariesArgs = ("perl", "Tools/Scripts/copy-webkitlibraries-to-product-directory", "--wksi");
if ($hasFTLJIT) {
- push @copyLibrariesArgs, "--ftl-jit";
+ push @copyLibrariesArgs, "--llvm";
}
push @copyLibrariesArgs, productDir();
+ print(join(" ", @copyLibrariesArgs) . "\n");
(system(@copyLibrariesArgs) == 0) or die;
} else {
push @projects, ("Source/WebKit2") if !$noWebKit2;
Modified: trunk/Tools/Scripts/copy-webkitlibraries-to-product-directory (163192 => 163193)
--- trunk/Tools/Scripts/copy-webkitlibraries-to-product-directory 2014-01-31 21:17:47 UTC (rev 163192)
+++ trunk/Tools/Scripts/copy-webkitlibraries-to-product-directory 2014-01-31 21:26:26 UTC (rev 163193)
@@ -30,18 +30,27 @@
use webkitdirs;
my $showHelp = 0;
-my $ftlJIT = 0;
+my $llvm = 0;
+my $wksi = 0;
+my $llvmIncludePackage = "";
+my $llvmLibraryPackage = "";
my $programName = basename($0);
my $usage = <<EOF;
Usage: $programName [options]
--help Show this help message
- --[no-]ftl-jit Toggle FTL JIT support (default: $ftlJIT)
+ --[no-]llvm Toggle copying LLVM drops (default: $llvm)
+ --[no-]wksi Toggle copying WebKitSystemInterface drops (default: $wksi)
+ --use-llvm-includes=<path> Get the LLVM inludes package from <path>
+ --use-llvm-libraries=<path> Get the LLVM libraries package from <path>
EOF
GetOptions(
'help' => \$showHelp,
- 'ftl-jit!' => \$ftlJIT,
+ 'llvm!' => \$llvm,
+ 'wksi!' => \$wksi,
+ 'use-llvm-includes=s' => \$llvmIncludePackage,
+ 'use-llvm-libraries=s' => \$llvmLibraryPackage,
);
if ($showHelp) {
@@ -54,26 +63,9 @@
chdirWebKit();
-my @librariesToCopy = (
- "libWebKitSystemInterfaceLion.a",
- "libWebKitSystemInterfaceMountainLion.a",
- "libWebKitSystemInterfaceMavericks.a",
-);
-
my $ranlib = `xcrun -find ranlib`;
chomp $ranlib;
-foreach my $libName (@librariesToCopy) {
- my $srcLib = "WebKitLibraries/" . $libName;
- my $lib = "$productDir/" . $libName;
- if (!-e $lib || -M $lib > -M $srcLib) {
- print "Updating $lib\n";
- (system("ditto", $srcLib, $lib) == 0) or die;
- (system($ranlib, $lib) == 0) or die;
- }
-}
-(system("mkdir", "-p", "$productDir/usr/local/include") == 0) or die;
-
sub unpackIfNecessary
{
my ($targetDir, $sampleFile, $package, $hasLibraries) = @_;
@@ -101,38 +93,64 @@
}
}
-dittoHeaders("WebKitLibraries/WebKitSystemInterface.h", "$productDir/usr/local/include/WebKitSystemInterface.h");
+if ($llvm || $wksi) {
+ (system("mkdir", "-p", "$productDir/usr/local/include") == 0) or die;
+}
-if ($ftlJIT) {
+if ($wksi) {
+ my @librariesToCopy = (
+ "libWebKitSystemInterfaceLion.a",
+ "libWebKitSystemInterfaceMountainLion.a",
+ "libWebKitSystemInterfaceMavericks.a",
+ );
+
+ foreach my $libName (@librariesToCopy) {
+ my $srcLib = "WebKitLibraries/" . $libName;
+ my $lib = "$productDir/" . $libName;
+ if (!-e $lib || -M $lib > -M $srcLib) {
+ print "Updating $lib\n";
+ (system("ditto", $srcLib, $lib) == 0) or die;
+ (system($ranlib, $lib) == 0) or die;
+ }
+ }
+
+ dittoHeaders("WebKitLibraries/WebKitSystemInterface.h", "$productDir/usr/local/include/WebKitSystemInterface.h");
+}
+
+if ($llvm) {
# Determine where to get LLVM binaries and headers.
my $majorDarwinVersion = (split /\./, `uname -r`)[0];
- my $llvmLibraryPackage;
- my $llvmIncludePackage;
my $useOwnLLVM = 0;
my $ownLLVMDirectory;
- if (defined($ENV{LLVM_SOURCE_PATH})) {
- $useOwnLLVM = 1;
- $ownLLVMDirectory = $ENV{LLVM_SOURCE_PATH};
- } elsif (-d "llvm" && -e "llvm/LLVMBuild.txt") {
- $useOwnLLVM = 1;
- $ownLLVMDirectory = sourceDir() . "/llvm";
- } elsif (defined($ENV{LLVM_LIBRARY_PACKAGE}) && defined($ENV{LLVM_INCLUDE_PACKAGE})) {
- $llvmLibraryPackage = $ENV{LLVM_LIBRARY_PACKAGE};
- $llvmIncludePackage = $ENV{LLVM_INCLUDE_PACKAGE};
- } elsif ($majorDarwinVersion == 11) {
- $llvmLibraryPackage = "WebKitLibraries/LLVMLibrariesLion.tar.bz2";
- $llvmIncludePackage = "WebKitLibraries/LLVMIncludesLion.tar.bz2";
- } elsif ($majorDarwinVersion == 12) {
- $llvmLibraryPackage = "WebKitLibraries/LLVMLibrariesMountainLion.tar.bz2";
- $llvmIncludePackage = "WebKitLibraries/LLVMIncludesMountainLion.tar.bz2";
- } else {
- print "Don't know where to find LLVM!\n";
- print "\n";
- print "Try defining LLVM_LIBRARY_PACKAGE and LLVM_INCLUDE_PACKAGE.\n";
- print "\n";
- print "Alternatively, you can check out llvm trunk into the WebKit directory:\n";
- print "svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm\n";
- exit 1;
+ if ($llvmLibraryPackage eq "" && $llvmIncludePackage eq "") {
+ if (defined($ENV{LLVM_SOURCE_PATH})) {
+ $useOwnLLVM = 1;
+ $ownLLVMDirectory = $ENV{LLVM_SOURCE_PATH};
+ } elsif (-d "llvm" && -e "llvm/LLVMBuild.txt") {
+ $useOwnLLVM = 1;
+ $ownLLVMDirectory = sourceDir() . "/llvm";
+ } elsif (defined($ENV{LLVM_LIBRARY_PACKAGE}) && defined($ENV{LLVM_INCLUDE_PACKAGE})) {
+ $llvmLibraryPackage = $ENV{LLVM_LIBRARY_PACKAGE};
+ $llvmIncludePackage = $ENV{LLVM_INCLUDE_PACKAGE};
+ } elsif ($majorDarwinVersion == 11) {
+ $llvmLibraryPackage = "WebKitLibraries/LLVMLibrariesLion.tar.bz2";
+ $llvmIncludePackage = "WebKitLibraries/LLVMIncludesLion.tar.bz2";
+ } elsif ($majorDarwinVersion == 12) {
+ $llvmLibraryPackage = "WebKitLibraries/LLVMLibrariesMountainLion.tar.bz2";
+ $llvmIncludePackage = "WebKitLibraries/LLVMIncludesMountainLion.tar.bz2";
+ } elsif ($majorDarwinVersion == 13) {
+ $llvmLibraryPackage = "WebKitLibraries/LLVMLibrariesMavericks.tar.bz2";
+ $llvmIncludePackage = "WebKitLibraries/LLVMIncludesMavericks.tar.bz2";
+ } else {
+ print "Don't know where to find LLVM!\n";
+ print "\n";
+ print "Try defining LLVM_LIBRARY_PACKAGE and LLVM_INCLUDE_PACKAGE or setting the\n";
+ print "--use-llvm-includes and --use-llvm-libraries options.\n";
+ print "\n";
+ print "Alternatively, you can check out llvm trunk into the WebKit directory:\n";
+ print "svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm\n";
+ exit 1;
+ }
}
sub fileContains
@@ -226,6 +244,5 @@
print {$fileHandle} "/* This file fools WebKit's build system into relinking _javascript_Core if the LLVM libraries changed. */\n";
close $fileHandle;
}
-
}