Skip to content

Commit 716a1ee

Browse files
committed
Improve logging for SDK path setting
1 parent b7627f5 commit 716a1ee

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1772,8 +1772,11 @@ lldb::TypeSystemSP SwiftASTContext::CreateInstance(lldb::LanguageType language,
17721772
sym_file->ParseXcodeSDK(*sym_file->GetCompileUnitAtIndex(i)));
17731773

17741774
std::string sdk_path = HostInfo::GetXcodeSDKPath(sdk).str();
1775-
LOG_PRINTF(LIBLLDB_LOG_TYPES, "Host SDK path is %s.", sdk_path.c_str());
1775+
LOG_PRINTF(LIBLLDB_LOG_TYPES, "Host SDK path for sdk %s is %s.",
1776+
sdk.GetString().str().c_str(), sdk_path.c_str());
17761777
if (FileSystem::Instance().Exists(sdk_path)) {
1778+
// Note that this is not final. InitializeSearchPathOptions()
1779+
// will set the SDK path based on the triple if this fails.
17771780
swift_ast_sp->SetPlatformSDKPath(sdk_path);
17781781
swift_ast_sp->GetCompilerInvocation().setSDKPath(sdk_path);
17791782
}
@@ -2639,6 +2642,8 @@ void SwiftASTContext::InitializeSearchPathOptions(
26392642
// depend on the SDK path including the
26402643
// RuntimeLibraryImportPaths, which are *only* initialized
26412644
// through this mechanism.
2645+
LOG_PRINTF(LIBLLDB_LOG_TYPES, "Setting SDK path \"%s\"",
2646+
sdk_path.c_str());
26422647
invocation.setSDKPath(sdk_path);
26432648
}
26442649

0 commit comments

Comments
 (0)