This is an archive of the discontinued LLVM Phabricator instance.

[CMake][Z3] Add customized Z3 install path to RPATH
AcceptedPublic

Authored by OikawaKirie on Dec 10 2021, 5:39 AM.

Details

Summary

When using a customized Z3 installation via variable LLVM_Z3_INSTALL_DIR, the desired Z3 installation may not be used if the system has another installation. And if there is not a system-wide one, the compilation will stop when using llvm-tblgen, as the libz3.so cannot be found by the executable.

This patch tries to fix this problem by adding the customized Z3 install path to RPATH. And it will not be added if the system-wide installed version is used (variable LLVM_Z3_INSTALL_DIR is not set during cmake).

Diff Detail

Event Timeline

OikawaKirie created this revision.Dec 10 2021, 5:39 AM
OikawaKirie requested review of this revision.Dec 10 2021, 5:39 AM
ddcc accepted this revision.Feb 15 2022, 5:27 PM

I haven't used the z3 integration in a long time, but looks fine to me.

This revision is now accepted and ready to land.Feb 15 2022, 5:27 PM