diff --git a/lldb/include/lldb/Host/posix/HostInfoPosix.h b/lldb/include/lldb/Host/posix/HostInfoPosix.h index 767f353f15150..bf80786dcade3 100644 --- a/lldb/include/lldb/Host/posix/HostInfoPosix.h +++ b/lldb/include/lldb/Host/posix/HostInfoPosix.h @@ -43,7 +43,9 @@ class HostInfoPosix : public HostInfoBase { static bool ComputeSwiftResourceDirectory(FileSpec &lldb_shlib_spec, FileSpec &file_spec, bool verify); #endif - + + static llvm::Expected GetSDKRoot(SDKOptions options); + protected: static bool ComputeSupportExeDirectory(FileSpec &file_spec); static bool ComputeHeaderDirectory(FileSpec &file_spec); diff --git a/lldb/source/Host/posix/HostInfoPosix.cpp b/lldb/source/Host/posix/HostInfoPosix.cpp index 390bda7dc4010..b8606e85bbdb1 100644 --- a/lldb/source/Host/posix/HostInfoPosix.cpp +++ b/lldb/source/Host/posix/HostInfoPosix.cpp @@ -117,6 +117,12 @@ std::optional PosixUserIDResolver::DoGetGroupName(id_t gid) { return std::nullopt; } +/// The SDK is the directory where the system C headers, libraries, can be found. +/// On POSIX platforms this is simply the root directory. +llvm::Expected HostInfoPosix::GetSDKRoot(SDKOptions options) { + return "/"; +} + static llvm::ManagedStatic g_user_id_resolver; UserIDResolver &HostInfoPosix::GetUserIDResolver() {