[lld] r203751 - [Driver] Create "link[.exe]" symlink for the Windows driver.

Rui Ueyama ruiu at google.com
Wed Mar 12 22:12:32 PDT 2014


Author: ruiu
Date: Thu Mar 13 00:12:31 2014
New Revision: 203751

URL: http://llvm.org/viewvc/llvm-project?rev=203751&view=rev
Log:
[Driver] Create "link[.exe]" symlink for the Windows driver.

Clang creates "clang-cl" as a symlink to (or a copy of) "clang" for the MSVC-
compatible driver. This patch is to do the same thing for "link" and "lld".

Differential Revision: http://llvm-reviews.chandlerc.com/D3066

Modified:
    lld/trunk/tools/lld/CMakeLists.txt

Modified: lld/trunk/tools/lld/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/tools/lld/CMakeLists.txt?rev=203751&r1=203750&r2=203751&view=diff
==============================================================================
--- lld/trunk/tools/lld/CMakeLists.txt (original)
+++ lld/trunk/tools/lld/CMakeLists.txt Thu Mar 13 00:12:31 2014
@@ -8,3 +8,16 @@ target_link_libraries(lld
 
 install(TARGETS lld
   RUNTIME DESTINATION bin)
+
+# Create the link[.exe] symlink in the build directory. If symlink is not
+# supported by the operating system, create a copy instead.
+if(UNIX)
+  set(command create_symlink)
+else()
+  set(command copy)
+endif()
+set(src "lld${CMAKE_EXECUTABLE_SUFFIX}")
+set(dst "link${CMAKE_EXECUTABLE_SUFFIX}")
+add_custom_command(TARGET lld POST_BUILD
+  COMMAND ${CMAKE_COMMAND} -E ${command} ${src} ${dst}
+  WORKING_DIRECTORY "${LLVM_RUNTIME_OUTPUT_INTDIR}")





More information about the llvm-commits mailing list