Skip to content

Only automatically link snippets to product libraries #5929

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

Conversation

bitjammer
Copy link
Contributor

Snippets illustrate how to use a package's products by design, so they shouldn't link to library targets that aren't exported as products.

If snippets link to all library targets, one negative result would be inadvertently linking to test support libraries, which could cause failures due to automatic linking of @rpath/libXCTestSwiftSupport.dylib, a library not available to snippets at runtime.

rdar://102746374

Snippets illustrate how to use a package's products by design, so they shouldn't link to library targets that aren't exported as products.

If snippets link to all library targets, one negative result would be inadvertently linking to test support libraries, which could cause failures due to automatic linking of `@rpath/libXCTestSwiftSupport.dylib`, a library not available to snippets at runtime.

rdar://102746374
@bitjammer
Copy link
Contributor Author

@swift-ci Please test

@bitjammer
Copy link
Contributor Author

@swift-ci Please smoke test

@tomerd tomerd merged commit fde9916 into swiftlang:main Nov 29, 2022
@bitjammer bitjammer deleted the acgarland/rdar-102746374-snippets-only-link-product-libraries branch November 29, 2022 21:14
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.

3 participants