While working to verify debugging of remotely built Swift libraries, Adrian Prantl read through some types logs from my project and noted that the "-simulator" suffix was missing from the triple used by the SwiftASTContextForExpressions. I have verified this is reproducible on the latest dev snapshot (from 12/18/19).
From the LLDB types log, I can see that the SwiftASTContextForExpressions is using the wrong triple ("-simulator" is missing):
Architecture : x86_64-apple-ios12.0.0
From the same types log, other instances of SwiftASTContext are using the correct triple (contains "-simulator"):
Architecture : x86_64-apple-ios12.0-simulator
- Download and unzip the attached Xcode project "AppShell".
- Select the appropriate Swift toolchain in Xcode (I used dev snapshot from 12/18/19).
- Set a breakpoint anywhere in AppDelegate.
- Build and run the project.
- When the breakpoint is hit, exec po self in the LLDB console.
- Observe the LLDB types log.
This is an Xcode project that resembles the way an iOS app is created by Bazel. The only source code is contained in "AppLib", which is linked with the source-less target "AppShell". To closely simulate my build environment, I have also set the -no-serialize-debugging-options flag which may or may not be related.