Title: [178656] trunk/Tools
Revision
178656
Author
ddkil...@apple.com
Date
2015-01-19 11:04:53 -0800 (Mon, 19 Jan 2015)

Log Message

[iOS] Do not hard-code iphoneos.internal SDK in buildXCodeProject()
<http://webkit.org/b/140623>

Reviewed by Daniel Bates.

* Scripts/build-webkit: Update help for --device switch.
* Scripts/webkitdirs.pm:
(determineXcodeSDK): When passing --device, prefer the internal
iOS SDK if it exists, else fall back to the external iOS SDK.
(buildXCodeProject): Use xcodeSDK() as -sdk argument for
xcodebuild instead of trying to sanitize values.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (178655 => 178656)


--- trunk/Tools/ChangeLog	2015-01-19 18:50:55 UTC (rev 178655)
+++ trunk/Tools/ChangeLog	2015-01-19 19:04:53 UTC (rev 178656)
@@ -1,3 +1,17 @@
+2015-01-19  David Kilzer  <ddkil...@apple.com>
+
+        [iOS] Do not hard-code iphoneos.internal SDK in buildXCodeProject()
+        <http://webkit.org/b/140623>
+
+        Reviewed by Daniel Bates.
+
+        * Scripts/build-webkit: Update help for --device switch.
+        * Scripts/webkitdirs.pm:
+        (determineXcodeSDK): When passing --device, prefer the internal
+        iOS SDK if it exists, else fall back to the external iOS SDK.
+        (buildXCodeProject): Use xcodeSDK() as -sdk argument for
+        xcodebuild instead of trying to sanitize values.
+
 2015-01-19  Alexey Proskuryakov  <a...@apple.com>
 
         "Unknown option: sharedworkerglobalscopeconstructorsfile" when running bindings tests.

Modified: trunk/Tools/Scripts/build-webkit (178655 => 178656)


--- trunk/Tools/Scripts/build-webkit	2015-01-19 18:50:55 UTC (rev 178655)
+++ trunk/Tools/Scripts/build-webkit	2015-01-19 19:04:53 UTC (rev 178656)
@@ -88,7 +88,7 @@
   --debug                           Compile with Debug configuration
   --release                         Compile with Release configuration
   --sdk=<sdk>                       Use a specific Xcode SDK (iOS and Mac only)
-  --device                          Use the current iphoneos.internal SDK (iOS only)
+  --device                          Use "iphoneos.internal" SDK if installed, else "iphoneos" SDK (iOS only)
   --simulator                       Use the current iphonesimulator SDK (iOS only)
   --coverage                        Enable code coverage support (Mac only)
   --analyze                         Enable static anaylsis (iOS and Mac only)

Modified: trunk/Tools/Scripts/webkitdirs.pm (178655 => 178656)


--- trunk/Tools/Scripts/webkitdirs.pm	2015-01-19 18:50:55 UTC (rev 178655)
+++ trunk/Tools/Scripts/webkitdirs.pm	2015-01-19 19:04:53 UTC (rev 178656)
@@ -434,7 +434,8 @@
         $xcodeSDK = $sdk;
     }
     if (checkForArgumentAndRemoveFromARGV("--device")) {
-        $xcodeSDK ||= 'iphoneos.internal';
+        my $hasInternalSDK = exitStatus(system("xcrun --sdk iphoneos.internal --show-sdk-version > /dev/null 2>&1")) == 0;
+        $xcodeSDK ||= $hasInternalSDK ? "iphoneos.internal" : "iphoneos";
     }
     if (checkForArgumentAndRemoveFromARGV("--sim") ||
         checkForArgumentAndRemoveFromARGV("--simulator") ||
@@ -1638,8 +1639,7 @@
         push(@extraOptions, "clean");
     }
 
-    push(@extraOptions, ("-sdk", "iphonesimulator")) if willUseIOSSimulatorSDKWhenBuilding();
-    push(@extraOptions, ("-sdk", "iphoneos.internal")) if willUseIOSDeviceSDKWhenBuilding();
+    push(@extraOptions, ("-sdk", xcodeSDK())) if isIOSWebKit();
 
     chomp($ENV{DSYMUTIL_NUM_THREADS} = `sysctl -n hw.activecpu`);
     return system "xcodebuild", "-project", "$project.xcodeproj", @extraOptions;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to