Skip to content

[CMake] Add padding to RUNPATH in linux #2090

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
Aug 30, 2023
Merged

[CMake] Add padding to RUNPATH in linux #2090

merged 1 commit into from
Aug 30, 2023

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Aug 23, 2023

Shared libraries RUNPATH will be updated when they are copied to swift build directory. CMake's 'file(SET_RPATH ...)' requires RUNPATH field have enough lengh before updating.

Shared libraries RUNPATH will be updated when they are copied to swift
build directory. CMake's 'file(SET_RPATH ...)' requires RUNPATH field
have enough lengh before updating.
@rintaro rintaro changed the title [CMake] Add padding to RUNPATH in linux [WIP][CMake] Add padding to RUNPATH in linux Aug 23, 2023
@rintaro
Copy link
Member Author

rintaro commented Aug 28, 2023

@swift-ci Please test

@rintaro rintaro marked this pull request as ready for review August 28, 2023 20:51
@rintaro rintaro requested a review from ahoppen as a code owner August 28, 2023 20:51
@rintaro rintaro requested a review from bnbarham August 28, 2023 20:51
@rintaro rintaro changed the title [WIP][CMake] Add padding to RUNPATH in linux [CMake] Add padding to RUNPATH in linux Aug 28, 2023
elseif (CMAKE_SYSTEM_NAME STREQUAL Linux)
# Make some room to update paths.
set_property(TARGET ${name} APPEND PROPERTY
INSTALL_RPATH ":::::::::::::::::::::::::::::::::::::::::::::::::::::::")
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this enough to cover all the platforms we know of?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's will be changed to $ORIGIN:$ORIGIN/../{platform name}. Yes, I don't believe any platform name would be longer than 45 characters.

Copy link
Member Author

Choose a reason for hiding this comment

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

🤔 I thought I made it : x 64 but this is actually 55. Anyway 36 characters for platform name should be enough :)

@bnbarham bnbarham merged commit b474940 into main Aug 30, 2023
@bnbarham bnbarham deleted the swift-swift-linux branch August 30, 2023 00:45
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