Skip to content

Commit 959dbd1

Browse files
committed
Revert "Revert "[cmake] [compiler-rt] Call llvm_setup_rpath() when adding shared libraries.""
This reverts commit 21c008d 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.
1 parent 6a40bb0 commit 959dbd1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler-rt/cmake/Modules/AddCompilerRT.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,9 @@ function(add_compiler_rt_runtime name type)
359359
target_link_libraries(${libname} PRIVATE ${builtins_${libname}})
360360
endif()
361361
if(${type} STREQUAL "SHARED")
362+
if(COMMAND llvm_setup_rpath)
363+
llvm_setup_rpath(${libname})
364+
endif()
362365
if(WIN32 AND NOT CYGWIN AND NOT MINGW)
363366
set_target_properties(${libname} PROPERTIES IMPORT_PREFIX "")
364367
set_target_properties(${libname} PROPERTIES IMPORT_SUFFIX ".lib")

0 commit comments

Comments
 (0)