Modified: trunk/Tools/ChangeLog (203550 => 203551)
--- trunk/Tools/ChangeLog 2016-07-22 03:29:16 UTC (rev 203550)
+++ trunk/Tools/ChangeLog 2016-07-22 04:45:20 UTC (rev 203551)
@@ -1,3 +1,24 @@
+2016-07-21 Dan Bernstein <[email protected]>
+
+ [Mac] webkitdirs.pm contains unused code to support outdated OS X and Xcode versions
+ https://bugs.webkit.org/show_bug.cgi?id=160072
+
+ Reviewed by Andy Estes.
+
+ * Scripts/webkitdirs.pm:
+ (readXcodeUserDefault): Changed to take a defaults key rather than a suffix. Removed support
+ for old Xcode versions.
+ (determineBaseProductDir): Removed support for old Xcode versions. Updated for the change
+ to readXcodeUserDefault.
+ (debugger): Deleted. This was only used for Darwin, where LLDB is now the only supported
+ debugger.
+ (determineDebugger): Ditto.
+ (checkRequiredSystemConfig): Updated to require at least OS X Yosemite v10.10.5 and Xcode
+ 7.0.
+ (printHelpAndExitForRunAndDebugWebKitAppIfNeeded): Removed --use-gdb and --use-lldb
+ switches.
+ (execMacWebKitAppForDebugging): Removed support for GDB.
+
2016-07-21 Myles C. Maxfield <[email protected]>
Remove support for deprecated SPI inlineMediaPlaybackRequiresPlaysInlineAttribute
Modified: trunk/Tools/Scripts/webkitdirs.pm (203550 => 203551)
--- trunk/Tools/Scripts/webkitdirs.pm 2016-07-22 03:29:16 UTC (rev 203550)
+++ trunk/Tools/Scripts/webkitdirs.pm 2016-07-22 04:45:20 UTC (rev 203551)
@@ -129,7 +129,6 @@
my $configurationProductDir;
my $sourceDir;
my $currentSVNRevision;
-my $debugger;
my $didLoadIPhoneSimulatorNotification;
my $nmPath;
my $osXVersion;
@@ -209,15 +208,11 @@
sub readXcodeUserDefault($)
{
- my ($unprefixedKey) = @_;
+ my ($key) = @_;
- determineXcodeVersion();
-
- my $xcodeDefaultsDomain = (eval "v$xcodeVersion" lt v4) ? "com.apple.Xcode" : "com.apple.dt.Xcode";
- my $xcodeDefaultsPrefix = (eval "v$xcodeVersion" lt v4) ? "PBX" : "IDE";
my $devnull = File::Spec->devnull();
- my $value = `defaults read $xcodeDefaultsDomain ${xcodeDefaultsPrefix}${unprefixedKey} 2> ${devnull}`;
+ my $value = `defaults read com.apple.dt.Xcode ${key} 2> ${devnull}`;
return if $?;
chomp $value;
@@ -243,24 +238,20 @@
unlink($personalPlistFile) || die "Could not delete $personalPlistFile: $!";
}
- determineXcodeVersion();
+ my $buildLocationStyle = join '', readXcodeUserDefault("IDEBuildLocationStyle");
+ if ($buildLocationStyle eq "Custom") {
+ my $buildLocationType = join '', readXcodeUserDefault("IDECustomBuildLocationType");
+ # FIXME: Read CustomBuildIntermediatesPath and set OBJROOT accordingly.
+ $baseProductDir = readXcodeUserDefault("IDECustomBuildProductsPath") if $buildLocationType eq "Absolute";
+ }
- if (eval "v$xcodeVersion" ge v4) {
- my $buildLocationStyle = join '', readXcodeUserDefault("BuildLocationStyle");
- if ($buildLocationStyle eq "Custom") {
- my $buildLocationType = join '', readXcodeUserDefault("CustomBuildLocationType");
- # FIXME: Read CustomBuildIntermediatesPath and set OBJROOT accordingly.
- $baseProductDir = readXcodeUserDefault("CustomBuildProductsPath") if $buildLocationType eq "Absolute";
- }
+ # DeterminedByTargets corresponds to a setting of "Legacy" in Xcode.
+ # It is the only build location style for which SHARED_PRECOMPS_DIR is not
+ # overridden when building from within Xcode.
+ $setSharedPrecompsDir = 1 if $buildLocationStyle ne "DeterminedByTargets";
- # DeterminedByTargets corresponds to a setting of "Legacy" in Xcode.
- # It is the only build location style for which SHARED_PRECOMPS_DIR is not
- # overridden when building from within Xcode.
- $setSharedPrecompsDir = 1 if $buildLocationStyle ne "DeterminedByTargets";
- }
-
if (!defined($baseProductDir)) {
- $baseProductDir = join '', readXcodeUserDefault("ApplicationwideBuildSettings");
+ $baseProductDir = join '', readXcodeUserDefault("IDEApplicationwideBuildSettings");
$baseProductDir = $1 if $baseProductDir =~ /SYMROOT\s*=\s*\"(.*?)\";/s;
}
@@ -1390,32 +1381,6 @@
return $ENV{'OS'} eq 'Windows_NT';
}
-sub debugger
-{
- determineDebugger();
- return $debugger;
-}
-
-sub determineDebugger
-{
- return if defined($debugger);
-
- determineXcodeVersion();
- if (eval "v$xcodeVersion" ge v4.5) {
- $debugger = "lldb";
- } else {
- $debugger = "gdb";
- }
-
- if (checkForArgumentAndRemoveFromARGV("--use-lldb")) {
- $debugger = "lldb";
- }
-
- if (checkForArgumentAndRemoveFromARGV("--use-gdb")) {
- $debugger = "gdb";
- }
-}
-
sub appendToEnvironmentVariableList($$)
{
my ($name, $value) = @_;
@@ -1516,17 +1481,16 @@
{
if (isDarwin()) {
chomp(my $productVersion = `sw_vers -productVersion`);
- if (eval "v$productVersion" lt v10.7.5) {
+ if (eval "v$productVersion" lt v10.10.5) {
print "*************************************************************\n";
- print "Mac OS X Version 10.7.5 or later is required to build WebKit.\n";
+ print "OS X Yosemite v10.10.5 or later is required to build WebKit.\n";
print "You have " . $productVersion . ", thus the build will most likely fail.\n";
print "*************************************************************\n";
}
- my $xcodebuildVersionOutput = `xcodebuild -version`;
- my $xcodeVersion = ($xcodebuildVersionOutput =~ /Xcode ([0-9](\.[0-9]+)*)/) ? $1 : undef;
- if (!$xcodeVersion || $xcodeVersion && eval "v$xcodeVersion" lt v4.6) {
+ determineXcodeVersion();
+ if (eval "v$xcodeVersion" lt v7.0) {
print "*************************************************************\n";
- print "Xcode Version 4.6 or later is required to build WebKit.\n";
+ print "Xcode 7.0 or later is required to build WebKit.\n";
print "You have an earlier version of Xcode, thus the build will\n";
print "most likely fail. The latest Xcode is available from the App Store.\n";
print "*************************************************************\n";
@@ -2160,17 +2124,10 @@
print STDERR <<EOF;
Usage: @{[basename($0)]} [options] [args ...]
--help Show this help message
- --no-saved-state Launch the application without state restoration (OS X 10.7 and later)
+ --no-saved-state Launch the application without state restoration
-g|--guard-malloc Enable Guard Malloc (OS X only)
EOF
- if ($includeOptionsForDebugging) {
- print STDERR <<EOF;
- --use-gdb Use GDB (this is the default when using Xcode 4.4 or earlier)
- --use-lldb Use LLDB (this is the default when using Xcode 4.5 or later)
-EOF
- }
-
exit(1);
}
@@ -2502,28 +2459,18 @@
sub execMacWebKitAppForDebugging($)
{
my ($appPath) = @_;
- my $architectureSwitch;
- my $argumentsSeparator;
+ my $architectureSwitch = "--arch";
+ my $argumentsSeparator = "--";
- if (debugger() eq "lldb") {
- $architectureSwitch = "--arch";
- $argumentsSeparator = "--";
- } elsif (debugger() eq "gdb") {
- $architectureSwitch = "-arch";
- $argumentsSeparator = "--args";
- } else {
- die "Unknown debugger $debugger.\n";
- }
-
- my $debuggerPath = `xcrun -find $debugger`;
+ my $debuggerPath = `xcrun -find lldb`;
chomp $debuggerPath;
- die "Can't find the $debugger executable.\n" unless -x $debuggerPath;
+ die "Can't find the lldb executable.\n" unless -x $debuggerPath;
my $productDir = productDir();
setupMacWebKitEnvironment($productDir);
my @architectureFlags = ($architectureSwitch, architecture());
- print "Starting @{[basename($appPath)]} under $debugger with DYLD_FRAMEWORK_PATH set to point to built WebKit in $productDir.\n";
+ print "Starting @{[basename($appPath)]} under lldb with DYLD_FRAMEWORK_PATH set to point to built WebKit in $productDir.\n";
exec { $debuggerPath } $debuggerPath, @architectureFlags, $argumentsSeparator, $appPath, argumentsForRunAndDebugMacWebKitApp() or die;
}