In order to use a build cache, we need to disable -serialize-debugging-options. Doing this prevents host specific paths from being embedded in .swiftmodule files.
However, disabling this breaks lldb's Swift AST resolution logic (I think). Specifically, Swift types, for example String, and Dictionary, are not resolved. This breaks expression evaluation and also printing values via frame variable.
Attached is a sample Xcode project. It has an xcconfig that sets two build settings:
The first one tells Xcode to not add -Xfrontend -serialize-debugging-options.
The second one tells swiftc to always disable serialized debugging options. Without this flag, any module with a main entry point will automatically contain serialized debugging options.
The Xcode project has a breakpoint in the app delegate, that prints the launchOptions argument. The output is: