mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
aeb0f0cdd2
This is just enough to get "llvm-ranlib foo.a" working and tested. Making llvm-ranlib a symbolic link to llvm-ar doesn't work so well with llvm's option parsing, but ar's option parsing is mostly custom anyway. This patch also removes the -X32_64 option. Looks like it was just added in r10297 as part of implementing the current command line parsing. I can add it back (with a test) if someone really has AIX portability problems without it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189489 91177308-0d34-0410-b5e6-96231b3b80d8
26 lines
837 B
CMake
26 lines
837 B
CMake
set(LLVM_LINK_COMPONENTS support object bitreader)
|
|
|
|
add_llvm_tool(llvm-ar
|
|
llvm-ar.cpp
|
|
)
|
|
|
|
# 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)
|
|
set(llvm_ar_binary "${LLVM_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/llvm-ar${CMAKE_EXECUTABLE_SUFFIX}")
|
|
endif()
|
|
|
|
set(llvm_ranlib "${LLVM_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/llvm-ranlib${CMAKE_EXECUTABLE_SUFFIX}")
|
|
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})
|
|
|
|
# TODO: Support check-local.
|