Skip to content

Commit 730b8d1

Browse files
Merge pull request #3013 from adrian-prantl/sdk-logging-next
Improve logging for SDK path setting
2 parents 64ddcbb + 296dc1e commit 730b8d1

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
@@ -1762,8 +1762,11 @@ lldb::TypeSystemSP SwiftASTContext::CreateInstance(lldb::LanguageType language,
17621762
sym_file->ParseXcodeSDK(*sym_file->GetCompileUnitAtIndex(i)));
17631763

17641764
std::string sdk_path = HostInfo::GetXcodeSDKPath(sdk).str();
1765-
LOG_PRINTF(LIBLLDB_LOG_TYPES, "Host SDK path is %s.", sdk_path.c_str());
1765+
LOG_PRINTF(LIBLLDB_LOG_TYPES, "Host SDK path for sdk %s is %s.",
1766+
sdk.GetString().str().c_str(), sdk_path.c_str());
17661767
if (FileSystem::Instance().Exists(sdk_path)) {
1768+
// Note that this is not final. InitializeSearchPathOptions()
1769+
// will set the SDK path based on the triple if this fails.
17671770
swift_ast_sp->SetPlatformSDKPath(sdk_path);
17681771
swift_ast_sp->GetCompilerInvocation().setSDKPath(sdk_path);
17691772
}
@@ -2629,6 +2632,8 @@ void SwiftASTContext::InitializeSearchPathOptions(
26292632
// depend on the SDK path including the
26302633
// RuntimeLibraryImportPaths, which are *only* initialized
26312634
// through this mechanism.
2635+
LOG_PRINTF(LIBLLDB_LOG_TYPES, "Setting SDK path \"%s\"",
2636+
sdk_path.c_str());
26322637
invocation.setSDKPath(sdk_path);
26332638
}
26342639

0 commit comments

Comments
 (0)