[PATCH] D93177: [CMake] Don't enable BUILD_WITH_INSTALL_RPATH when using custom build rpath

Raul Tambre via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 7 02:47:06 PST 2021


tambre marked an inline comment as done.
tambre added a comment.

In D93177#2481569 <https://reviews.llvm.org/D93177#2481569>, @phosek wrote:

> This is fine with me, but I wonder we should avoid setting this property for every target and instead rely on `CMAKE_BUILD_WITH_INSTALL_RPATH` (we could set `CMAKE_BUILD_WITH_INSTALL_RPATH` to `ON` if unset to preserve the current behavior).

That would be better.
Since there's a small chance some places are relying on it being `OFF` globally, I'd prefer to do that as follow-up, so it can be reverted more easily.



================
Comment at: llvm/cmake/modules/AddLLVM.cmake:870-878
+    if("${CMAKE_BUILD_RPATH}" STREQUAL "")
+      set(build_with_install ON)
+    else()
+      set(build_with_install OFF)
+    endif()
+
     set_target_properties(${name} PROPERTIES
----------------
phosek wrote:
> You could also consider something like this to avoid the extra variable (the same below).
Thanks!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93177/new/

https://reviews.llvm.org/D93177



More information about the llvm-commits mailing list