Title: [190583] trunk/Tools
- Revision
- 190583
- Author
- [email protected]
- Date
- 2015-10-05 15:30:11 -0700 (Mon, 05 Oct 2015)
Log Message
[iOS] Make it possible to build WebKit using iphoneos SDK without a developer certificate installed
https://bugs.webkit.org/show_bug.cgi?id=140828
<rdar://problem/19520599>
Reviewed by Alexey Proskuryakov.
Support building WebKit for iOS device without an iOS Developer certificate installed. Otherwise,
we will pass CODE_SIGN_IDENTITY="iPhone Developer: " to Xcode to find a iOS Developer certificate
to use. To use a specific installed iOS Developer certificate, explicitly pass CODE_SIGN_IDENTITY
to build-webkit.
* Scripts/webkitdirs.pm:
(XcodeOptions): Cleaned up code. When building for iOS device, pass to Xcode CODE_SIGN_IDENTITY="iPhone Developer: "
to code sign using the installed iOS development certificate (if it exists - we assume there is only one such certificate).
Otherwise, pass CODE_SIGN_IDENTITY="" and CODE_SIGNING_REQUIRED=NO to Xcode to disable code signing.
(hasIOSDevelopmentCertificate): Added.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (190582 => 190583)
--- trunk/Tools/ChangeLog 2015-10-05 22:16:55 UTC (rev 190582)
+++ trunk/Tools/ChangeLog 2015-10-05 22:30:11 UTC (rev 190583)
@@ -1,5 +1,24 @@
2015-10-05 Daniel Bates <[email protected]>
+ [iOS] Make it possible to build WebKit using iphoneos SDK without a developer certificate installed
+ https://bugs.webkit.org/show_bug.cgi?id=140828
+ <rdar://problem/19520599>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Support building WebKit for iOS device without an iOS Developer certificate installed. Otherwise,
+ we will pass CODE_SIGN_IDENTITY="iPhone Developer: " to Xcode to find a iOS Developer certificate
+ to use. To use a specific installed iOS Developer certificate, explicitly pass CODE_SIGN_IDENTITY
+ to build-webkit.
+
+ * Scripts/webkitdirs.pm:
+ (XcodeOptions): Cleaned up code. When building for iOS device, pass to Xcode CODE_SIGN_IDENTITY="iPhone Developer: "
+ to code sign using the installed iOS development certificate (if it exists - we assume there is only one such certificate).
+ Otherwise, pass CODE_SIGN_IDENTITY="" and CODE_SIGNING_REQUIRED=NO to Xcode to disable code signing.
+ (hasIOSDevelopmentCertificate): Added.
+
+2015-10-05 Daniel Bates <[email protected]>
+
DumpRenderTree built with public iOS SDK crashes under -[WebPreferences(WebPrivate) _setCurrentNetworkLoaderSessionCookieAcceptPolicy:]
https://bugs.webkit.org/show_bug.cgi?id=149766
Modified: trunk/Tools/Scripts/webkitdirs.pm (190582 => 190583)
--- trunk/Tools/Scripts/webkitdirs.pm 2015-10-05 22:16:55 UTC (rev 190582)
+++ trunk/Tools/Scripts/webkitdirs.pm 2015-10-05 22:30:11 UTC (rev 190583)
@@ -93,6 +93,9 @@
use constant SIMULATOR_DEVICE_STATE_BOOTED => "3";
use constant SIMULATOR_DEVICE_SUFFIX_FOR_WEBKIT_DEVELOPMENT => "For WebKit Development";
+# See table "Certificate types and names" on <https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html#//apple_ref/doc/uid/TP40012582-CH31-SW41>.
+use constant IOS_DEVELOPMENT_CERTIFICATE_NAME_PREFIX => "iPhone Developer: ";
+
our @EXPORT_OK;
my $architecture;
@@ -659,6 +662,11 @@
$generateDsym = checkForArgumentAndRemoveFromARGV("--dsym");
}
+sub hasIOSDevelopmentCertificate()
+{
+ return !exitStatus(system("security find-identity -p codesigning | grep '" . IOS_DEVELOPMENT_CERTIFICATE_NAME_PREFIX . "' > /dev/null 2>&1"));
+}
+
sub argumentsForXcode()
{
my @args = ();
@@ -674,11 +682,24 @@
determineASanIsEnabled();
determineXcodeSDK();
- my @sdkOption = ($xcodeSDK ? "SDKROOT=$xcodeSDK" : ());
- my @architectureOption = ($architecture ? "ARCHS=$architecture" : ());
- my @asanOption = ($asanIsEnabled ? ("-xcconfig", sourceDir() . "/Tools/asan/asan.xcconfig", "ASAN_IGNORE=" . sourceDir() . "/Tools/asan/webkit-asan-ignore.txt") : ());
-
- return ("-UseSanitizedBuildSystemEnvironment=YES", @baseProductDirOption, "-configuration", $configuration, @architectureOption, @sdkOption, @asanOption, argumentsForXcode());
+ my @options;
+ push @options, "-UseSanitizedBuildSystemEnvironment=YES";
+ push @options, ("-configuration", $configuration);
+ push @options, ("-xcconfig", sourceDir() . "/Tools/asan/asan.xcconfig", "ASAN_IGNORE=" . sourceDir() . "/Tools/asan/webkit-asan-ignore.txt") if $asanIsEnabled;
+ push @options, @baseProductDirOption;
+ push @options, "ARCHS=$architecture" if $architecture;
+ push @options, "SDKROOT=$xcodeSDK" if $xcodeSDK;
+ if (willUseIOSDeviceSDKWhenBuilding()) {
+ if (hasIOSDevelopmentCertificate()) {
+ # FIXME: May match more than one installed development certificate.
+ push @options, "CODE_SIGN_IDENTITY=" . IOS_DEVELOPMENT_CERTIFICATE_NAME_PREFIX;
+ } else {
+ push @options, "CODE_SIGN_IDENTITY="; # No identity
+ push @options, "CODE_SIGNING_REQUIRED=NO";
+ }
+ }
+ push @options, argumentsForXcode();
+ return @options;
}
sub XcodeOptionString
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes