[llvm-branch-commits] [llvm] 913c430 - Revert "[CMake] Don't enable BUILD_WITH_INSTALL_RPATH when using custom build rpath"
Raul Tambre via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Jan 8 10:04:10 PST 2021
Author: Raul Tambre
Date: 2021-01-08T19:59:20+02:00
New Revision: 913c430403b52b9336ed93fabbac363a3e18536a
URL: https://github.com/llvm/llvm-project/commit/913c430403b52b9336ed93fabbac363a3e18536a
DIFF: https://github.com/llvm/llvm-project/commit/913c430403b52b9336ed93fabbac363a3e18536a.diff
LOG: Revert "[CMake] Don't enable BUILD_WITH_INSTALL_RPATH when using custom build rpath"
This reverts commit 0ebc1fb29f278db0665423f15c53e6ee9601dddb.
The behaviour should have been the same as before unless specifying CMAKE_BUILD_RPATH,
which was previously broken.
However, this seems to have broken builds for some people that don't specify it.
Reverting until I can investigate.
Differential Revision: https://reviews.llvm.org/D94319
Added:
Modified:
llvm/cmake/modules/AddLLVM.cmake
Removed:
################################################################################
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index dc06ea14c584..b86fbdaaa6d8 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -865,13 +865,10 @@ macro(add_llvm_executable name)
if(NOT ARG_NO_INSTALL_RPATH)
llvm_setup_rpath(${name})
- else()
- # Enable BUILD_WITH_INSTALL_RPATH unless CMAKE_BUILD_RPATH is set.
- if(NOT "${CMAKE_BUILD_RPATH}" STREQUAL "")
- set_property(TARGET ${name} PROPERTY BUILD_WITH_INSTALL_RPATH ON)
- endif()
-
- set_property(TARGET ${name} PROPERTY INSTALL_RPATH "${LLVM_LOCAL_RPATH}")
+ elseif (LLVM_LOCAL_RPATH)
+ set_target_properties(${name} PROPERTIES
+ BUILD_WITH_INSTALL_RPATH On
+ INSTALL_RPATH "${LLVM_LOCAL_RPATH}")
endif()
if(DEFINED windows_resource_file)
@@ -2116,12 +2113,8 @@ function(llvm_setup_rpath name)
return()
endif()
- # Enable BUILD_WITH_INSTALL_RPATH unless CMAKE_BUILD_RPATH is set.
- if(NOT "${CMAKE_BUILD_RPATH}" STREQUAL "")
- set_property(TARGET ${name} PROPERTY BUILD_WITH_INSTALL_RPATH ON)
- endif()
-
set_target_properties(${name} PROPERTIES
+ BUILD_WITH_INSTALL_RPATH On
INSTALL_RPATH "${_install_rpath}"
${_install_name_dir})
endfunction()
More information about the llvm-branch-commits
mailing list