Skip to content

Improve logging for SDK path setting #3013

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

Merged
merged 1 commit into from
May 28, 2021
Merged
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
7 changes: 6 additions & 1 deletion lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1762,8 +1762,11 @@ lldb::TypeSystemSP SwiftASTContext::CreateInstance(lldb::LanguageType language,
sym_file->ParseXcodeSDK(*sym_file->GetCompileUnitAtIndex(i)));

std::string sdk_path = HostInfo::GetXcodeSDKPath(sdk).str();
LOG_PRINTF(LIBLLDB_LOG_TYPES, "Host SDK path is %s.", sdk_path.c_str());
LOG_PRINTF(LIBLLDB_LOG_TYPES, "Host SDK path for sdk %s is %s.",
sdk.GetString().str().c_str(), sdk_path.c_str());
if (FileSystem::Instance().Exists(sdk_path)) {
// Note that this is not final. InitializeSearchPathOptions()
// will set the SDK path based on the triple if this fails.
swift_ast_sp->SetPlatformSDKPath(sdk_path);
swift_ast_sp->GetCompilerInvocation().setSDKPath(sdk_path);
}
Expand Down Expand Up @@ -2629,6 +2632,8 @@ void SwiftASTContext::InitializeSearchPathOptions(
// depend on the SDK path including the
// RuntimeLibraryImportPaths, which are *only* initialized
// through this mechanism.
LOG_PRINTF(LIBLLDB_LOG_TYPES, "Setting SDK path \"%s\"",
sdk_path.c_str());
invocation.setSDKPath(sdk_path);
}

Expand Down