Skip to content

Conversation

@bnbarham
Copy link
Contributor

This was added so that test binaries could find swift-testing, but we should insert those paths into DYLD_*_PATH rather than add to the rpath. The current behavior adds an absolute rpath to all binaries, not even just test binaries.

@bnbarham
Copy link
Contributor Author

@swift-ci please test

Copy link
Member

@dschaefer2 dschaefer2 left a comment

Choose a reason for hiding this comment

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

Oof, yes, adding this to the env makes sense. We'll have to keep an eye on this as we transition the build system to make sure it's doing what we need.

@bnbarham
Copy link
Contributor Author

@swift-ci please test macOS platform

This was added so that test binaries could find swift-testing, but we
should insert those paths into `DYLD_*_PATH` rather than add to the
rpath. The current behavior adds an absolute rpath to *all* binaries,
not even just test binaries.
@bnbarham
Copy link
Contributor Author

@swift-ci please test macOS platform

@bnbarham
Copy link
Contributor Author

@swift-ci please test Linux platform

@bnbarham
Copy link
Contributor Author

@swift-ci please test Windows platform

@bnbarham
Copy link
Contributor Author

@swift-ci please test Windows platform

@bnbarham bnbarham merged commit 8493d0b into swiftlang:main Feb 18, 2025
5 checks passed
@bnbarham bnbarham deleted the move-rpath branch February 18, 2025 20:44
plemarquand added a commit to plemarquand/vscode-swift that referenced this pull request Apr 24, 2025
A change in SwiftPM removed the rpath that pointed to
`usr/lib/swift/macosx/testing`
(swiftlang/swift-package-manager#8295).

Consequently when debugging tests in VS Code `libTesting.dylib` could
not be found and the tests would not start. This is only happening in
nightly toolchains that contain the SwiftPM change noted above.

Fix this by adding the search path to the DYLD_LIBRARY_PATH.
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.

4 participants