Modified: trunk/Tools/ChangeLog (141514 => 141515)
--- trunk/Tools/ChangeLog 2013-02-01 01:32:10 UTC (rev 141514)
+++ trunk/Tools/ChangeLog 2013-02-01 01:34:04 UTC (rev 141515)
@@ -1,3 +1,17 @@
+2013-01-31 David Farler <dfar...@apple.com>
+
+ Provide a sensible default architecture when building on iOS SDKs
+ https://bugs.webkit.org/show_bug.cgi?id=108395
+
+ Reviewed by Joseph Pecoraro.
+
+ * Scripts/webkitdirs.pm:
+ (determineArchitecture):
+ Check for iphoneos and iphonesimulator SDKs for a default arch.
+ (determineXcodeSDK): Added.
+ (xcodeSDK): Added.
+ (XcodeOptions): Add ARCHS= if defined.
+
2013-01-31 Christopher Cameron <ccame...@chromium.org>
Fix rubber-band effect on non-scrollable pages
Modified: trunk/Tools/Scripts/webkitdirs.pm (141514 => 141515)
--- trunk/Tools/Scripts/webkitdirs.pm 2013-02-01 01:32:10 UTC (rev 141514)
+++ trunk/Tools/Scripts/webkitdirs.pm 2013-02-01 01:34:04 UTC (rev 141515)
@@ -80,6 +80,7 @@
my $baseProductDir;
my @baseProductDirOption;
my $configuration;
+my $xcodeSDK;
my $configurationForVisualStudio;
my $configurationProductDir;
my $sourceDir;
@@ -301,6 +302,7 @@
$architecture = "";
determineBaseProductDir();
+ determineXcodeSDK();
if (isGtk()) {
determineConfigurationProductDir();
@@ -317,9 +319,15 @@
if ($architecture) {
chomp $architecture;
} else {
- my $supports64Bit = `sysctl -n hw.optional.x86_64`;
- chomp $supports64Bit;
- $architecture = 'x86_64' if $supports64Bit;
+ if (not defined $xcodeSDK or $xcodeSDK =~ /\/|macosx/) {
+ my $supports64Bit = `sysctl -n hw.optional.x86_64`;
+ chomp $supports64Bit;
+ $architecture = 'x86_64' if $supports64Bit;
+ } elsif ($xcodeSDK =~ /iphonesimulator/) {
+ $architecture = 'i386';
+ } elsif ($xcodeSDK =~ /iphoneos/) {
+ $architecture = 'armv7';
+ }
}
} elsif (isEfl()) {
my $host_processor = "";
@@ -396,6 +404,30 @@
return @args;
}
+sub determineXcodeSDK
+{
+ return if defined $xcodeSDK;
+ for (my $i = 0; $i <= $#ARGV; $i++) {
+ my $opt = $ARGV[$i];
+ if ($opt =~ /^--sdk$/i) {
+ splice(@ARGV, $i, 1);
+ $xcodeSDK = splice(@ARGV, $i, 1);
+ } elsif ($opt =~ /^--device$/i) {
+ splice(@ARGV, $i, 1);
+ $xcodeSDK = 'iphoneos.internal';
+ } elsif ($opt =~ /^--sim(ulator)?/i) {
+ splice(@ARGV, $i, 1);
+ $xcodeSDK = 'iphonesimulator';
+ }
+ }
+}
+
+sub xcodeSDK
+{
+ determineXcodeSDK();
+ return $xcodeSDK;
+}
+
sub determineConfigurationForVisualStudio
{
return if defined $configurationForVisualStudio;
@@ -520,7 +552,12 @@
determineBaseProductDir();
determineConfiguration();
determineArchitecture();
- return (@baseProductDirOption, "-configuration", $configuration, "ARCHS=$architecture", argumentsForXcode());
+ determineXcodeSDK();
+
+ my @sdkOption = ($xcodeSDK ? "SDKROOT=$xcodeSDK" : ());
+ my @architectureOption = ($architecture ? "ARCHS=$architecture" : ());
+
+ return (@baseProductDirOption, "-configuration", $configuration, @architectureOption, @sdkOption, argumentsForXcode());
}
sub XcodeOptionString