It is sufficient to call webkitdirs::determineXcodeSDK() at the top of script copy-webkitlibraries-to-product-directory to process the --sdk/--device/--ios-simulator command line arguments instead of calling webkitdirs::willUseIOSDeviceSDK() as the latter ultimately calls the former. The purpose of the function webkitdirs::willUseIOSDeviceSDK() is to determine if we will use the iOS device SDK (from parsing the --sdk option or from the presence of the --device option) and as its name implies it returns a boolean value. In contrast, webkitdirs::determineXcodeSDK() does not have a return value and it simply computes and caches the Xcode SDK we will use so that webkitdirs::willUseIOSDeviceSDK() can use this cache.
Created attachment 274882 [details] Patch
Committed r198668: <http://trac.webkit.org/changeset/198668>