forked from OSchip/llvm-project
Revert "Revert "[cmake] [compiler-rt] Call llvm_setup_rpath() when adding shared libraries.""
This reverts commit 21c008d5a5
since
it broke the build on macOS and Windows with the following error:
The install of the clang_rt.<na,e> target requires changing an
RPATH from the build tree, but this is not supported with the Ninja
generator unless on an ELF-based platform. The
CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set to avoid this relinking
step.
This commit is contained in:
parent
6a40bb01f6
commit
959dbd1761
|
@ -359,6 +359,9 @@ function(add_compiler_rt_runtime name type)
|
|||
target_link_libraries(${libname} PRIVATE ${builtins_${libname}})
|
||||
endif()
|
||||
if(${type} STREQUAL "SHARED")
|
||||
if(COMMAND llvm_setup_rpath)
|
||||
llvm_setup_rpath(${libname})
|
||||
endif()
|
||||
if(WIN32 AND NOT CYGWIN AND NOT MINGW)
|
||||
set_target_properties(${libname} PROPERTIES IMPORT_PREFIX "")
|
||||
set_target_properties(${libname} PROPERTIES IMPORT_SUFFIX ".lib")
|
||||
|
|
Loading…
Reference in New Issue