This is an archive of the discontinued LLVM Phabricator instance.

Re-land "[CMake] Don't enable BUILD_WITH_INSTALL_RPATH when using custom build rpath"
ClosedPublic

Authored by tambre on Jan 8 2021, 10:22 AM.

Details

Summary

Reverted check for empty CMAKE_BUILD_RPATH fixed.

When BUILD_WITH_INSTALL_RPATH is enabled it prevents using a custom rpath only
for the build tree as the install rpath will be used. This makes it impossible to run a
runtimes build when compiling with Clang and wanting the installed rpath to be
empty (i.e. -DCMAKE_BUILD_RPATH="<some path>" -DCMAKE_SKIP_INSTALL_RPATH=ON).

Disable BUILD_WITH_INSTALL_RPATH when CMAKE_BUILD_RPATH is non-empty to
allow for such build scenarios.

Diff Detail