Modified: trunk/Tools/ChangeLog (177601 => 177602)
--- trunk/Tools/ChangeLog 2014-12-20 00:13:14 UTC (rev 177601)
+++ trunk/Tools/ChangeLog 2014-12-20 00:15:15 UTC (rev 177602)
@@ -1,3 +1,32 @@
+2014-12-19 Daniel Bates <[email protected]>
+
+ copy-webkitlibraries-to-product-directory uses wrong SDK when called from build-webkit
+ https://bugs.webkit.org/show_bug.cgi?id=139829
+
+ Reviewed by Alexey Proskuryakov.
+
+ The script build-webkit calls script copy-webkitlibraries-to-product-directory with
+ argument --sdk to specify the Xcode SDK to use, but copy-webkitlibraries-to-product-directory
+ expects the Xcode SDK to be specified using the --sdk-name command line argument.
+
+ Currently copy-webkitlibraries-to-product-directory has its own logic to handle
+ parsing for a specified Xcode SDK. Instead we should make use of the webkitdirs.pm
+ logic to both avoid duplicating effort and make the command line options for
+ copy-webkitlibraries-to-product-directory for specify the Xcode SDK consistent
+ with the approach used in other WebKit tools.
+
+ As a side effect of making use of the webkitdirs.pm logic for determining the Xcode SDK
+ copy-webkitlibraries-to-product-directory now recognizes --device and --simulator
+ shorthands for --sdk=iphoneos.internal and --sdk=iphonesimulator, respectively.
+
+ * Scripts/copy-webkitlibraries-to-product-directory: Also, renamed some variables to
+ improve the readability of the code.
+ (executeRanlib): Added; convenience function that calls the RANLIB(1) with the appropriate
+ Xcode SDK. We pass -no_warning_for_no_symbols to RANLIB(1) when using an Xcode SDK
+ for iOS since it's acceptable that an empty object file (say, for a Mac-specific feature)
+ be included in a library.
+ (unpackIfNecessary): Modified to call executeRanlib().
+
2014-12-19 Alexey Proskuryakov <[email protected]>
REGRESSION (177368): Some tests started to immediately time out
Modified: trunk/Tools/Scripts/copy-webkitlibraries-to-product-directory (177601 => 177602)
--- trunk/Tools/Scripts/copy-webkitlibraries-to-product-directory 2014-12-20 00:13:14 UTC (rev 177601)
+++ trunk/Tools/Scripts/copy-webkitlibraries-to-product-directory 2014-12-20 00:15:15 UTC (rev 177602)
@@ -40,7 +40,6 @@
my $preferSystemLLVMOverDrops = 0;
my $llvmSubdirectoryName = "llvm";
my $llvmPrefix = "/usr/local/LLVMForJavaScriptCore";
-my $sdkName = ""; # Ideally we only use this for build commands, rather than deciding policies about what needs to get copied or built and where it needs to be placed.
my $osxVersion;
my $force = 0;
@@ -57,7 +56,9 @@
--[no-]prefer-system-llvm Toggle preferring the system LLVM over the binary drops (default: $preferSystemLLVMOverDrops)
--llvm-subdirectory=<name> Set the name of the LLVM subdirectory to search for (default: $llvmSubdirectoryName)
--llvm-prefix=<path> Set the prefix into which LLVM is installed (default: $llvmPrefix)
- --sdk-name=<name> Set the name of the Xcode SDK to use.
+ --sdk=<sdk> Use a specific Xcode SDK
+ --device Use the current iphoneos.internal SDK (iOS only)
+ --simulator Use the current iphonesimulator SDK (iOS only)
--osx-version=<version> Set the OS X version to use when deciding what to copy.
--[no-]force Toggle forcing the copy - i.e. ignoring timestamps (default: $force)
EOF
@@ -73,7 +74,6 @@
'prefer-system-llvm!' => \$preferSystemLLVMOverDrops,
'llvm-subdirectory=s' => \$llvmSubdirectoryName,
'llvm-prefix=s' => \$llvmPrefix,
- 'sdk-name=s' => \$sdkName,
'osx-version=s' => \$osxVersion,
'force!' => \$force
);
@@ -83,6 +83,8 @@
exit 1;
}
+determineXcodeSDK();
+
my $productDir = shift @ARGV;
if ($productDir) {
$productDir = File::Spec->rel2abs($productDir);
@@ -97,12 +99,15 @@
chdirWebKit();
-my $xcrunOptions = "";
-if ($sdkName ne "") {
- $xcrunOptions .= " -sdk $sdkName";
+sub executeRanlib($)
+{
+ my ($library) = @_;
+ my @args;
+ push @args, ("-sdk", xcodeSDK()) if xcodeSDK();
+ push @args, "ranlib";
+ push @args, "-no_warning_for_no_symbols" if isIOSWebKit();
+ system("xcrun", @args, $library) == 0 or die;
}
-my $ranlib = `xcrun $xcrunOptions -find ranlib`;
-chomp $ranlib;
sub unpackIfNecessary
{
@@ -114,7 +119,7 @@
foreach my $library (`tar -tf $package`) {
chomp $library;
print " Ranlib $library\n";
- (system($ranlib, $targetDir . "/" . $library) == 0) or die;
+ executeRanlib($targetDir . "/" . $library);
}
}
return 1;
@@ -143,13 +148,13 @@
"libWebKitSystemInterfaceYosemite.a",
);
- foreach my $libName (@librariesToCopy) {
- my $srcLib = "WebKitLibraries/" . $libName;
- my $lib = "$libraryDir/" . $libName;
- if ($force || !-e $lib || -M $lib > -M $srcLib) {
- print "Updating $lib\n";
- (system("ditto", $srcLib, $lib) == 0) or die;
- (system($ranlib, $lib) == 0) or die;
+ foreach my $libraryName (@librariesToCopy) {
+ my $sourceLibrary = "WebKitLibraries/" . $libraryName;
+ my $targetLibrary = "$libraryDir/" . $libraryName;
+ if ($force || !-e $targetLibrary || -M $targetLibrary > -M $sourceLibrary) {
+ print "Updating $targetLibrary\n";
+ (system("ditto", $sourceLibrary, $targetLibrary) == 0) or die;
+ executeRanlib($targetLibrary);
}
}
@@ -281,7 +286,7 @@
|| !fileContentsEquals($ranlibToken, $sourceLibrary)
|| -M $ranlibToken > -M $sourceLibrary) {
print " Ranlib $filename\n";
- (system($ranlib, $targetLibrary) == 0) or die;
+ executeRanlib($targetLibrary);
(open my $fileHandle, ">", $ranlibToken) or die;
print {$fileHandle} "$sourceLibrary";
close $fileHandle;