This patch fixes SDK selection in the following case:
platform select remote-ios --sysroot "/Users/IliaK/Library/Developer/Xcode/iOS DeviceSupport/8.1.2 (12B440)" --build 12B440 --version 8.1.2 target create --arch arm64 "~/Project1.app"
Currently the lldb selects a first SDK version (in name order) in directory and then updates it after the device is connected. This approach ignores user's arguments and actually "platform select" command doesn't make sense.
After this patch, lldb takes a SDK which matches to user's arguments.
Is this code even needed if PlatformRemoteiOS::UpdateSDKDirectoryInfosIfNeeded() puts the m_sdk_sysroot in first in the list? Or is this code for when no sysroot is specified and only a build number was specified?