[AIX] Update rpath for BUILD_SHARED_LIBS
authorJinsong Ji <jji@us.ibm.com>
Sat, 20 Mar 2021 03:48:48 +0000 (03:48 +0000)
committerJinsong Ji <jji@us.ibm.com>
Sat, 20 Mar 2021 20:31:43 +0000 (20:31 +0000)
commit14696baaf4c43fe53f738bc292bbe169eed93d5d
tree1d05a397dd89f9a5e2c0b506fc6e0258cc09f577
parentf628ba0b55b117dc68f9cb3be58189c05910660c
[AIX] Update rpath for BUILD_SHARED_LIBS

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.

Reviewed By: hubert.reinterpretcast

Differential Revision: https://reviews.llvm.org/D98901
llvm/cmake/modules/AddLLVM.cmake
llvm/cmake/modules/HandleLLVMOptions.cmake