This is an archive of the discontinued LLVM Phabricator instance.

[CMake][AIX] Fixing AIX rpath
ClosedPublic

Authored by qiongsiwu1 on Apr 20 2023, 6:17 PM.

Details

Summary

Recent commit https://github.com/llvm/llvm-project/commit/8f833f88ab78265a8e0ebb0d1522771d67c708a9 modified the installation rpath and did not set BUILD_WITH_INSTALL_RPATH correctly on AIX, which led to installation failures on AIX. This patch sets BUILD_WITH_INSTALL_RPATH on AIX to fix the installation failures.

Diff Detail

Event Timeline

qiongsiwu1 created this revision.Apr 20 2023, 6:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 20 2023, 6:17 PM
Herald added a subscriber: ekilmer. · View Herald Transcript
qiongsiwu1 requested review of this revision.Apr 20 2023, 6:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 20 2023, 6:17 PM
qiongsiwu1 edited the summary of this revision. (Show Details)

LGTM, thanks

Context: the tool chain doesn't support modifying rpaths/libpaths for XCOFF on install at the moment, so this is required.

llvm/cmake/modules/AddLLVM.cmake
2357–2359

nit: let's update the comment

daltenty accepted this revision.Apr 21 2023, 6:26 AM
This revision is now accepted and ready to land.Apr 21 2023, 6:26 AM

Addressing review comment.

qiongsiwu1 marked an inline comment as done.Apr 21 2023, 6:48 AM
qiongsiwu1 added inline comments.
llvm/cmake/modules/AddLLVM.cmake
2357–2359

Ah thanks for catching this David! Fixed.

qiongsiwu1 marked an inline comment as done.Apr 21 2023, 6:49 AM

Ah, sorry, I solicited feedback on the AIX changes on the original review, but got none. You will also want to undo the split of the AIX rpaths I put in above, moving everything to _install_rpath instead.

Also, do you mind removing Windows from this list? I'm fairly certain that has no effect, as the logic above returns if not an Apple, Unix, or AIX platform, but I simply put it in because of a previous LLVM commit message for 959dbd1761c that reported this same error on Windows, likely erroneously.

Addressing review comments.

qiongsiwu1 added a comment.EditedApr 21 2023, 7:56 AM
In D148866#4287133, @buttaface wrote:

Ah, sorry, I solicited feedback on the AIX changes on the original review, but got none. You will also want to undo the split of the AIX rpaths I put in above, moving everything to _install_rpath instead.

Also, do you mind removing Windows from this list? I'm fairly certain that has no effect, as the logic above returns if not an Apple, Unix, or AIX platform, but I simply put it in because of a previous LLVM commit message for 959dbd1761c that reported this same error on Windows, likely erroneously.

Thanks for the feedback @buttaface !! Not a problem. The engineer pinged in the original patch is no longer working on AIX. The patch is updated.

finagolfin accepted this revision.Apr 21 2023, 8:08 AM

Thanks, LGTM.

This revision was automatically updated to reflect the committed changes.