summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2015-09-24 21:53:18 +0000
committerChris Bieneman <beanz@apple.com>2015-09-24 21:53:18 +0000
commit77456efcb177e7d3741c7733d25e6f11cb38a3ac (patch)
tree0878c3be6d754987a6e2cc6d26f3bd29010397b7
parent590a48d4de415a7b86ce4a27e112f67c9574e65d (diff)
downloadbcm5719-llvm-77456efcb177e7d3741c7733d25e6f11cb38a3ac.tar.gz
bcm5719-llvm-77456efcb177e7d3741c7733d25e6f11cb38a3ac.zip
[CMake] Move LLD to the new style for symlink generation, and make the links list overridable.
Reviewers: lhames, rafael Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D13136 llvm-svn: 248544
-rw-r--r--lld/tools/lld/CMakeLists.txt19
1 files changed, 7 insertions, 12 deletions
diff --git a/lld/tools/lld/CMakeLists.txt b/lld/tools/lld/CMakeLists.txt
index 76e9f4fa4a5..2b6d9c2e102 100644
--- a/lld/tools/lld/CMakeLists.txt
+++ b/lld/tools/lld/CMakeLists.txt
@@ -11,18 +11,13 @@ target_link_libraries(lld
install(TARGETS lld
RUNTIME DESTINATION bin)
-if(UNIX)
- set(LLD_LINK_OR_COPY create_symlink)
- set(lld_binary "lld${CMAKE_EXECUTABLE_SUFFIX}")
-
-else()
- set(LLD_LINK_OR_COPY copy)
- set(lld_binary "${LLVM_RUNTIME_OUTPUT_INTDIR}/lld${CMAKE_EXECUTABLE_SUFFIX}")
+if(NOT LLD_SYMLINKS_TO_CREATE)
+ set(LLD_SYMLINKS_TO_CREATE lld-link)
endif()
-set(lld_link "${LLVM_RUNTIME_OUTPUT_INTDIR}/lld-link${CMAKE_EXECUTABLE_SUFFIX}")
-
-add_custom_command(TARGET lld POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E ${LLD_LINK_OR_COPY} "${lld_binary}" "${lld_link}")
+foreach(link ${LLD_SYMLINKS_TO_CREATE})
+ add_llvm_tool_symlink(${link} lld ALWAYS_GENERATE)
+ # Always generate install targets
+ llvm_install_symlink(${link} lld ALWAYS_GENERATE)
+endforeach()
-install(SCRIPT install_symlink.cmake -DCMAKE_INSTALL_PREFIX=\"${CMAKE_INSTALL_PREFIX}\")
OpenPOWER on IntegriCloud