Host: generalise `GetXcodeSDKPath`
authorSaleem Abdulrasool <compnerd@compnerd.org>
Fri, 28 Apr 2023 16:29:19 +0000 (09:29 -0700)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Fri, 28 Apr 2023 16:30:59 +0000 (09:30 -0700)
commitade3c6a6a88ed3a9b06c076406f196da9d3cc1b9
tree6862d070438c5f37da2dfe6e4f8c29789e48ae93
parent8c8fe11916b03887f89f04b216e0044f2a9cb505
Host: generalise `GetXcodeSDKPath`

This generalises the GetXcodeSDKPath hook to a GetSDKRoot path which
will be re-used for the Windows support to compute a language specific
SDK path on the platform. Because there may be other options that we
wish to use to compute the SDK path, sink the XcodeSDK parameter into
a structure which can pass a disaggregated set of options. Furthermore,
optionalise the parameter as Xcode is not available for all platforms.

Differential Revision: https://reviews.llvm.org/D149397
Reviewed By: JDevlieghere
lldb/include/lldb/Host/HostInfoBase.h
lldb/include/lldb/Host/macosx/HostInfoMacOSX.h
lldb/source/Core/Module.cpp
lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
lldb/unittests/Host/HostInfoTest.cpp