Page MenuHomePhabricator

Fix SDK selection using "platform select" when --sysroot/--version/--build options were specified
ClosedPublic

Authored by ki.stfu on Mar 11 2015, 5:06 AM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

ki.stfu updated this revision to Diff 21688.Mar 11 2015, 5:06 AM
ki.stfu retitled this revision from to Fix SDK selection using "platform select" when --sysroot/--version/--build options were specified.
ki.stfu updated this object.
ki.stfu edited the test plan for this revision. (Show Details)
ki.stfu added reviewers: jasonmolenda, clayborg.
ki.stfu added subscribers: jasonmolenda, clayborg, Unknown Object (MLST).
clayborg edited edge metadata.Mar 11 2015, 10:36 AM

See my inline comments and let me know

source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
756–777 ↗(On Diff #21688)

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?

ki.stfu added inline comments.Mar 11 2015, 12:12 PM
source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
756–777 ↗(On Diff #21688)

Yes. The second case is right.

clayborg accepted this revision.Mar 11 2015, 12:44 PM
clayborg edited edge metadata.

Looks good then.

This revision is now accepted and ready to land.Mar 11 2015, 12:44 PM
ki.stfu closed this revision.Mar 12 2015, 12:23 AM
This revision was automatically updated to reflect the committed changes.