Skip to content

Use the root directory as the SDK root on POSIX platforms #10963

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: swift/release/6.2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lldb/include/lldb/Host/posix/HostInfoPosix.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ class HostInfoPosix : public HostInfoBase {
static bool ComputeSwiftResourceDirectory(FileSpec &lldb_shlib_spec,
FileSpec &file_spec, bool verify);
#endif


static llvm::Expected<llvm::StringRef> GetSDKRoot(SDKOptions options);

protected:
static bool ComputeSupportExeDirectory(FileSpec &file_spec);
static bool ComputeHeaderDirectory(FileSpec &file_spec);
Expand Down
6 changes: 6 additions & 0 deletions lldb/source/Host/posix/HostInfoPosix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ std::optional<std::string> 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<llvm::StringRef> HostInfoPosix::GetSDKRoot(SDKOptions options) {
return "/";
}

static llvm::ManagedStatic<PosixUserIDResolver> g_user_id_resolver;

UserIDResolver &HostInfoPosix::GetUserIDResolver() {
Expand Down