[PATCH] D146918: [CMake] Don't set absolute paths as install runpaths on ELF platforms in llvm_setup_rpath()
Alex Bradbury via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 19 21:45:10 PDT 2023
asb added a comment.
This commit seems to be breaking my standard build config (at least, an incremental build fails when trying to regenerate ninja, with many errors of the form:
CMake Error at cmake/modules/AddLLVM.cmake:588 (add_library):
The install of the LLVMDemangle target requires changing an RPATH from the
build tree, but this is not supported with the Ninja generator unless on an
ELF-based or XCOFF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH
variable may be set to avoid this relinking step.
Call Stack (most recent call first):
cmake/modules/AddLLVM.cmake:848 (llvm_add_library)
cmake/modules/AddLLVM.cmake:825 (add_llvm_library)
lib/Demangle/CMakeLists.txt:1 (add_llvm_component_library)
and a final error:
CMake Generate step failed. Build files cannot be regenerated correctly.
This is with a build config like the following (split dwarf and shared libs are I suppose slightly uncommon):
cmake -G Ninja -DCMAKE_BUILD_TYPE="Debug" \
-DLLVM_ENABLE_PROJECTS="clang;lld" \
-DBUILD_SHARED_LIBS=True -DLLVM_USE_SPLIT_DWARF=True \
-DLLVM_BUILD_TESTS=True \
-DLLVM_CCACHE_BUILD=ON \
-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
-DLLVM_ENABLE_LLD=True \
-DLLVM_TARGETS_TO_BUILD="all" \
-DLLVM_APPEND_VC_REV=False ../../llvm
My usual release config seems ok:
cmake -G Ninja -DCMAKE_BUILD_TYPE="Release" \
-DLLVM_ENABLE_PROJECTS="clang;lld" \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DLLVM_CCACHE_BUILD=ON \
-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
-DLLVM_ENABLE_LLD=True \
-DLLVM_TARGETS_TO_BUILD="all" \
-DLLVM_APPEND_VC_REV=False ../../llvm
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146918/new/
https://reviews.llvm.org/D146918
More information about the llvm-commits
mailing list