Skip to content

Remove rpaths to the toolchain libraries #4208

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 1 commit into from
Mar 14, 2022
Merged

Remove rpaths to the toolchain libraries #4208

merged 1 commit into from
Mar 14, 2022

Conversation

neonichu
Copy link
Contributor

This was originally added to enable workflows like swift run on systems without Swift libraries in the OS. SwiftPM does not run on any systems old enough anymore at this point, so these rpaths can be removed at this point.

This was originally added to enable workflows like `swift run` on systems without Swift libraries in the OS. SwiftPM does not run on any systems old enough anymore at this point, so these rpaths can be removed at this point.
@neonichu
Copy link
Contributor Author

@swift-ci please smoke test

Copy link
Contributor

@abertelrud abertelrud left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @neonichu

@neonichu neonichu merged commit 8876f87 into main Mar 14, 2022
@neonichu neonichu deleted the no-toolchain-rpath branch March 14, 2022 17:20
ahoppen added a commit to ahoppen/swift-syntax that referenced this pull request Mar 15, 2022
Previously, we were relying on SwiftPM adding the toolchain’s stdlib to the rpaths and we were finding `lib_InternalSwiftSyntaxParser.dylib` inside the stdlib directory. This behavior was removed in swiftlang/swift-package-manager#4208.

Explicitly add the directory that contains `lib_InternalSwiftSyntaxParser.dylib` as an rpath to SwiftSyntaxParser when compiling SwiftSyntax using build-script.py.

The major downsides of this approach are
- You can no longer run SwiftSyntaxParser tests for SwiftSyntax in Xcode with an open source toolchain
  - Maybe this isn’t too bad because it only affects SwiftSyntaxParser tests and those can be run from the command line
- All adopters of SwiftSyntax also need to explicitly specify the `lib_InternalSwiftSyntaxParser.dylib` rpath
  - Maybe this isn’t too bad because on Linux `lib_InternalSwiftSyntaxParser.dylib` is in the standard search paths and on macOS we start shipping `lib_InternalSwiftSyntaxParser.dylib` as a binary dependency.
ahoppen added a commit to ahoppen/sourcekit-lsp that referenced this pull request Jul 31, 2022
Since swiftlang/swift-package-manager#4208 SwiftPM no longer adds rpath to the toolchain libraries, so we don’t need to exclude them.
ahoppen added a commit to ahoppen/sourcekit-lsp that referenced this pull request Jul 31, 2022
Since swiftlang/swift-package-manager#4208 SwiftPM no longer adds rpath to the toolchain libraries, so we don’t need to exclude them.
ahoppen added a commit to ahoppen/sourcekit-lsp that referenced this pull request Aug 3, 2022
Since swiftlang/swift-package-manager#4208 SwiftPM no longer adds rpath to the toolchain libraries, so we don’t need to exclude them.
ahoppen added a commit to ahoppen/sourcekit-lsp that referenced this pull request Aug 3, 2022
Since swiftlang/swift-package-manager#4208 SwiftPM no longer adds rpath to the toolchain libraries, so we don’t need to exclude them.
ahoppen added a commit to ahoppen/sourcekit-lsp that referenced this pull request Aug 3, 2022
Since swiftlang/swift-package-manager#4208 SwiftPM no longer adds rpath to the toolchain libraries, so we don’t need to exclude them.
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