Skip to content

Don't link libc++ or libstd++ for Embedded Swift #7357

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

Merged
merged 2 commits into from
Feb 23, 2024

Conversation

MaxDesiatov
Copy link
Contributor

These libraries are not usually available for embedded platforms. A workaround of passing this flag via unsafeFlags in Package.swift still remains after this change.

These libraries are not usually available for embedded platforms. A workaround of passing this flag via `unsafeFlags` in `Package.swift` still remains after this change.
@MaxDesiatov MaxDesiatov added bug build system Changes to interactions with build systems embedded Support for Embedded Swift labels Feb 21, 2024
@MaxDesiatov MaxDesiatov self-assigned this Feb 21, 2024
@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

@MaxDesiatov MaxDesiatov enabled auto-merge (squash) February 21, 2024 22:16
Comment on lines 59 to 60
// Don't link unavailable libc++ or libstd++ when building for Embedded Swift
if !buildProduct.product.targets.contains(where: \.underlying.isEmbeddedSwiftTarget) {
Copy link
Member

Choose a reason for hiding this comment

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

I don't think C++ runtime library is unavailable for all Embedded platforms. For example, it seems like Pico SDK provides libc++: https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm

So it might be worth mentioning that in such case we ask users to explicitly specify desired C++ runtime via Xlinker.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've expanded the comment removing the word "unavailable", with potential solutions suggested there as well.

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test windows

6 similar comments
@MaxDesiatov
Copy link
Contributor Author

@swift-ci test windows

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test windows

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test windows

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test windows

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test windows

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test windows

@MaxDesiatov MaxDesiatov merged commit fc1b37a into main Feb 23, 2024
@MaxDesiatov MaxDesiatov deleted the maxd/embedded-libcxx branch February 23, 2024 16:22
furby-tm pushed a commit to wabiverse/swift-package-manager that referenced this pull request May 15, 2024
These libraries are not usually available for embedded platforms. A
workaround of passing this flag via `unsafeFlags` in `Package.swift`
still remains after this change.
furby-tm pushed a commit to wabiverse/swift-package-manager that referenced this pull request May 15, 2024
These libraries are not usually available for embedded platforms. A
workaround of passing this flag via `unsafeFlags` in `Package.swift`
still remains after this change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug build system Changes to interactions with build systems embedded Support for Embedded Swift
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants