Skip to content

[cmake] Set up rpath for macOS binaries #1732

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

Closed
wants to merge 1 commit into from

Conversation

Steelskin
Copy link

The rpath was not set for macOS binaries, resulting in binaries that needed post-build modifications to be runnable. This change sets the rpath for every binary built and fixes the installation folders for Swift libraries.

The rpath was not set for macOS binaries, resulting in binaries that
needed post-build modifications to be runnable. This change sets the
rpath for every binary built and fixes the installation folders for
Swift libraries.
@artemcm artemcm requested a review from etcwilde November 19, 2024 17:59
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin)
set_target_properties(SwiftDriverExecution PROPERTIES
INSTALL_RPATH "$<$<PLATFORM_ID:Darwin>:@loader_path/../pm/llbuild>")
Copy link
Member

Choose a reason for hiding this comment

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

This shouldn't be needed, since there's another copy in @executable_path/../lib/swift/macosx. I've already submitted a pull to remove this copy, swiftlang/swift#77647.

Copy link
Author

Choose a reason for hiding this comment

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

It depends on how swift-llbuild is built, but after further discussions, it seems lib/swift/macosx is the wrong directory for dynamic libraries and they should be in lib instead. I am closing this PR for now.

@Steelskin Steelskin closed this Nov 20, 2024
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