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

[lldb][cxx-interop] Populate C++ stdlib options correctly #10084

Open
wants to merge 1 commit into
base: stable/20240723
Choose a base branch
from

Conversation

egorzhdan
Copy link

This fixes errors printed by lldb:

error: module 'XYZ' was built with libc++, but current compilation uses unknown C++ stdlib

rdar://144894619

@egorzhdan
Copy link
Author

@swift-ci please test

@adrian-prantl
Copy link

Is this needed in the swift/release/6.1 branch, too?

@@ -2560,6 +2560,7 @@ SwiftASTContext::CreateInstance(lldb::LanguageType language, Module &module,

swift_ast_sp->InitializeSearchPathOptions(module_search_paths,
framework_search_paths);
swift_ast_sp->GetCompilerInvocation().computeCXXStdlibOptions();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What information does this function depend on? Would it make sense to sink this into InitializeSearchPathOptions/ConfigureResourceDirs/SetCompilerInvocationLLDBOverrides?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, I moved this into InitializeSearchPathOptions.

computeCXXStdlibOptions depends on the ClangImporter options and on the SDK/search path being configured.

@adrian-prantl
Copy link

Also, thanks, this is great! :-)

@egorzhdan
Copy link
Author

Is this needed in the swift/release/6.1 branch, too?

I think it would be needed, yes. I'll put up a separate PR for the release branch.

This fixes errors printed by lldb:

```
error: module 'XYZ' was built with libc++, but current compilation uses unknown C++ stdlib
```

rdar://144894619
@egorzhdan egorzhdan force-pushed the egorzhdan/20240723-lldb-cxxstdlib branch from 1bb5831 to 24bff50 Compare February 24, 2025 13:15
@egorzhdan
Copy link
Author

@swift-ci please test

@egorzhdan egorzhdan marked this pull request as ready for review February 24, 2025 13:34
@egorzhdan egorzhdan requested a review from a team as a code owner February 24, 2025 13:34
@egorzhdan
Copy link
Author

Looks like the test failures are unrelated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants