Xcode could not resolve type from dSYM if build folder is different

hi @Adrian_Prantl, I have maybe a similar issue.

lldb knows of the variables, but doesn't know of some types, for example Swift.String. In the types log, I see:

SwiftASTContext("SomeModuleTests")::GetTypeFromMangledTypename("$sSSD")
SwiftASTContext("SomeModuleTests")::GetTypeFromMangledTypename("$sSSD") -- found in the negative cache
SwiftASTContext("SomeModuleTests")::GetTypeFromMangledTypename("$sSSD") -- not cached, searching

I'm not sure what the "negative cache" is, and despite saying "found", it appears that it's not actually finding it. In fact, it seems to be missing all of the Swift module.

When using -serialize-debugging-options, those lines aren't present, and instead there's this:

SwiftASTContextForExpressions::GetModule("Swift") -- found Swift

This line is not present when using -no-serialize-debugging-options. So it seems the swiftmodules contain references to Swift stdlib? Is there another way to create that reference without using serialized debugging options?

Here's a gist with the two type logs: no-serialize-debugging-options.txt ยท GitHub

Any direction would be much appreciated. We want to use -no-serialize-debugging-options to make swiftmodule files are cacheable and usable from any machine, which means ensuring it has no hard coded paths.