[Lldb-commits] [PATCH] D76471: Remap the target SDK directory to the host SDK directory

Adrian Prantl via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 30 14:11:38 PDT 2020

aprantl added a comment.

> In case of Apple platforms, this won't make a difference in practice, since the support for that is implemented in PlatformDarwin (which all of these inherit from), but it sounds like this will be a problem for the "linux" sdk (assuming this is what I think it is), as there the selected platform will be PlatformLinux, which has no clue about these sdk thingies.

The "Linux" SDK is a placeholder of sorts when debugging a Swift-on-Linux server application (e.g., something like https://www.kitura.io/) from *within* Xcode that points to a directory that contains the Swift resources/stdlib cross-compiled for Linux. So this is still an Xcode SDK that should be managed by PlatformDarwin despite the confusing name.

> So, it sounds to me like the sdk type should somehow play a role in the selection of the platform instance, or this functionality should be moved down into some Host function.

Since there is only going to be one place that does the SDK detection via xcrun, I would either move it to PlatformDarwin or HostMacOSX. Personally, I think I prefer the Host, since this is something that is really about the machine LLDB is running on and not about the remote platform.



More information about the lldb-commits mailing list