Page MenuHomePhabricator

[AIX] Update rpath for BUILD_SHARED_LIBS
ClosedPublic

Authored by jsji on Mar 18 2021, 2:44 PM.

Details

Summary

BUILD_SHARED_LIBS build llvm component as shared library,
which can reduce the size a lot.

Normally, the binary use ORIGIN../lib to load component libraries,
unfortunatly, ORIGIN is not supported by AIX ld.

We hardcoded the build lib and install lib path in rpath for now
to enable BUILD_SHARED_LIBS build.

Understand that this is not perfect solution,
we can update this when we find better solution.

Diff Detail

Event Timeline

jsji created this revision.Mar 18 2021, 2:44 PM
jsji requested review of this revision.Mar 18 2021, 2:44 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 18 2021, 2:44 PM
llvm/cmake/modules/AddLLVM.cmake
2113

How should LLVM_LIBRARY_DIR (used with extra_libdir) be incorporated (or not) here?

llvm/cmake/modules/HandleLLVMOptions.cmake
218

Minor wording/grammar nits.

jsji added inline comments.Mar 19 2021, 1:34 PM
llvm/cmake/modules/AddLLVM.cmake
2113

I can include extra_libdir if we want to support LLVM_INSTALL_PREFIX as well.

llvm/cmake/modules/AddLLVM.cmake
2113

Thanks. I think adding extra_libdir makes sense to reduce unnecessary differences.

jsji updated this revision to Diff 331994.Mar 19 2021, 1:50 PM

Address comments.

jsji marked an inline comment as done.Mar 19 2021, 2:12 PM
jsji marked 2 inline comments as done.
This revision is now accepted and ready to land.Mar 19 2021, 6:44 PM
This revision was landed with ongoing or failed builds.Mar 20 2021, 1:32 PM
This revision was automatically updated to reflect the committed changes.