2013-12-10 11:13:32 +00:00
|
|
|
set(LLVM_LINK_COMPONENTS
|
|
|
|
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
|
|
|
# FIXME: this is duplicated from the clang CMakeLists.txt
|
|
|
|
# FIXME: bin/llvm-ranlib is not a valid build target with this setup (pr17024)
|
|
|
|
|
|
|
|
if(UNIX)
|
|
|
|
set(LLVM_LINK_OR_COPY create_symlink)
|
|
|
|
set(llvm_ar_binary "llvm-ar${CMAKE_EXECUTABLE_SUFFIX}")
|
|
|
|
else()
|
|
|
|
set(LLVM_LINK_OR_COPY copy)
|
2013-12-16 16:03:08 +00:00
|
|
|
set(llvm_ar_binary "${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-ar${CMAKE_EXECUTABLE_SUFFIX}")
|
2013-08-28 16:22:16 +00:00
|
|
|
endif()
|
|
|
|
|
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
|
|
|
add_custom_command(TARGET llvm-ar POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E ${LLVM_LINK_OR_COPY} "${llvm_ar_binary}" "${llvm_ranlib}")
|
|
|
|
|
|
|
|
set_property(DIRECTORY APPEND
|
|
|
|
PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${llvm_ranlib})
|
|
|
|
|
2008-09-22 01:08:49 +00:00
|
|
|
# TODO: Support check-local.
|