Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-12932] Custom toolchain picks up wrong target based on iOS deployment target #4465

Closed
swift-ci opened this issue Jun 3, 2020 · 6 comments
Closed
Assignees
Labels
bug LLDB for Swift

Comments

@swift-ci
Copy link

@swift-ci swift-ci commented Jun 3, 2020

Previous ID SR-12932
Radar rdar://problem/63943132
Original Reporter steipete (JIRA User)
Type Bug
Status Resolved
Resolution Done

Attachment: Download

Environment

Version 11.5 (11E608c)

macOS 10.15.5 (19F96)

Swift trunk toolchain May 26, 2020

Additional Detail from JIRA
Votes 1
Component/s LLDB for Swift
Labels Bug
Assignee @adrian-prantl
Priority Medium

md5: 4a4dc190396d95422e0f647dd8bb548f

is duplicated by:

  • SR-10686 LLDB fails for iOS when using custom Swift toolchains

Issue Description:

When using a custom Swift toolchain (here: trunk snapshot May 26, 2020), lldb fails with an incompatible target error on a normal iOS project:

::GetInstanceVariableOffset_Metadata() – ivar_name = _url, type = Foundation.URL

warning: Swift error in fallback scratch context: error: module 'Swift' was created for incompatible target x86_64-apple-ios13.0-simulator: /Users/steipete/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Swift-3K8REJ00QGV2U.swiftmodule

note: This error message is displayed only once. If the error displayed above is due to conflicting search paths to Clang modules in different images of the debugged executable, this can slow down debugging of Swift code significantly, since a fresh Swift context has to be created every time a conflict is encountered.

SwiftASTContextForExpressions::SetTriple("x86_64-apple-ios12.0.0") setting to "x86_64-apple-ios12.0.0"

Full log with lldb type logging enabled:

https://gist.github.com/steipete/257f7ddbf365a1e07cb323f51444ecc4

This is unexpected and only with bumping ideas back with @weissi I found out that I can fix this by changing the iOS Deployment Target to 13. It was set to 12 before, since our project still supports iOS 12. A barebones example with the issue is attached.

I would expect that using a Swift toolchain works like the integrated toolchain that comes with Xcode. Debugging works fine If I move the toolchain back to the Xcode 11.5 default.

@weissi
Copy link
Member

@weissi weissi commented Jun 3, 2020

@swift-ci create

@adrian-prantl
Copy link
Member

@adrian-prantl adrian-prantl commented Jul 9, 2020

This is addressed by https://reviews.llvm.org/D82616, which has been cherry-picked to swift/release/5.3.

@adrian-prantl
Copy link
Member

@adrian-prantl adrian-prantl commented Jul 9, 2020

@adrian-prantl
Copy link
Member

@adrian-prantl adrian-prantl commented Jul 9, 2020

Please note that this may still not work completely in Xcode 12 beta 2, because of #1350

@swift-ci
Copy link
Author

@swift-ci swift-ci commented Jul 26, 2020

Comment by Peter Steinberger (JIRA)

As of Xcode 12b3, this isn't working yet. But looks like it's just a matter of time until this fix lands in a release. Thanks for fixing this!

@adrian-prantl
Copy link
Member

@adrian-prantl adrian-prantl commented Jul 27, 2020

This could be #1548

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 7, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug LLDB for Swift
Projects
None yet
Development

No branches or pull requests

3 participants