Skip to content

Commit 7725fb2

Browse files
authored
Merge pull request #10963 from CodingCarpincho/sdk-root-cherry-pick
Use the root directory as the SDK root on POSIX platforms
2 parents d9eaf1f + 4cf19c2 commit 7725fb2

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

lldb/include/lldb/Host/posix/HostInfoPosix.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ class HostInfoPosix : public HostInfoBase {
4343
static bool ComputeSwiftResourceDirectory(FileSpec &lldb_shlib_spec,
4444
FileSpec &file_spec, bool verify);
4545
#endif
46-
46+
47+
static llvm::Expected<llvm::StringRef> GetSDKRoot(SDKOptions options);
48+
4749
protected:
4850
static bool ComputeSupportExeDirectory(FileSpec &file_spec);
4951
static bool ComputeHeaderDirectory(FileSpec &file_spec);

lldb/source/Host/posix/HostInfoPosix.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@ std::optional<std::string> PosixUserIDResolver::DoGetGroupName(id_t gid) {
117117
return std::nullopt;
118118
}
119119

120+
/// The SDK is the directory where the system C headers, libraries, can be found.
121+
/// On POSIX platforms this is simply the root directory.
122+
llvm::Expected<llvm::StringRef> HostInfoPosix::GetSDKRoot(SDKOptions options) {
123+
return "/";
124+
}
125+
120126
static llvm::ManagedStatic<PosixUserIDResolver> g_user_id_resolver;
121127

122128
UserIDResolver &HostInfoPosix::GetUserIDResolver() {

0 commit comments

Comments
 (0)