2013-12-10 11:13:32 +00:00
|
|
|
set(LLVM_LINK_COMPONENTS
|
2014-07-03 19:40:08 +00:00
|
|
|
${LLVM_TARGETS_TO_BUILD}
|
2014-07-14 05:01:53 +00:00
|
|
|
Core
|
2013-12-10 11:13:32 +00:00
|
|
|
Object
|
|
|
|
Support
|
|
|
|
)
|
2008-09-22 01:08:49 +00:00
|
|
|
|
|
|
|
add_llvm_tool(llvm-ar
|
|
|
|
llvm-ar.cpp
|
|
|
|
)
|
|
|
|
|
2013-08-28 16:22:16 +00:00
|
|
|
if(UNIX)
|
|
|
|
set(LLVM_LINK_OR_COPY create_symlink)
|
|
|
|
else()
|
|
|
|
set(LLVM_LINK_OR_COPY copy)
|
|
|
|
endif()
|
|
|
|
|
2014-12-03 23:17:24 +00:00
|
|
|
set(llvm_ar_binary "llvm-ar${CMAKE_EXECUTABLE_SUFFIX}")
|
2013-12-16 16:03:08 +00:00
|
|
|
set(llvm_ranlib "${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-ranlib${CMAKE_EXECUTABLE_SUFFIX}")
|
2013-08-28 16:22:16 +00:00
|
|
|
|
2014-12-03 23:17:24 +00:00
|
|
|
add_custom_command(OUTPUT ${llvm_ranlib}
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E ${LLVM_LINK_OR_COPY} "${llvm_ar_binary}" "${llvm_ranlib}")
|
2013-08-28 16:22:16 +00:00
|
|
|
|
2014-12-03 23:17:24 +00:00
|
|
|
add_custom_target(llvm_ranlib_build ALL DEPENDS ${llvm_ranlib})
|
|
|
|
install(FILES "${llvm_ranlib}" DESTINATION bin)
|