This is an archive of the discontinued LLVM Phabricator instance.

[CMake] Set CMAKE_BUILD_WITH_INSTALL_RPATH for Fuchsia runtimes
ClosedPublic

Authored by phosek on May 8 2018, 4:37 PM.

Details

Summary

This doesn't make any difference since we don't use RPATH/RUNPATH
on Fuchsia but it avoids the CMake error when re-linking libraries
while building with Ninja.

Diff Detail

Event Timeline

phosek created this revision.May 8 2018, 4:37 PM
phosek added a comment.May 8 2018, 4:41 PM

Actually after testing this I believe this is really what we want, without this option CMake sets RPATH for build libraries and then removes it when installing these. With this option it doesn't even set the RPATH for build libraries.

Need some clarification on this option

  1. The rpath is the path from which libs mentioned in .dynamic are relative to?
  2. Normally cmake first links binaries without setting the RPATH and then sets it later.
  3. This makes RPATH always equal to the empty string and avoids the "relinking" step that resets RPATH

If so this LGTM

jakehehrlich accepted this revision.May 8 2018, 5:43 PM

Spoke offline, LGTM

This revision is now accepted and ready to land.May 8 2018, 5:43 PM
phosek closed this revision.May 8 2018, 8:41 PM