[PATCH] [Driver] Create "link[.exe]" symlink for the Windows driver.

Rui Ueyama ruiu at google.com
Wed Mar 12 20:34:59 PDT 2014


Hi Bigcheese, shankarke, kledzik,

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".

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

Files:
  tools/lld/CMakeLists.txt

Index: tools/lld/CMakeLists.txt
===================================================================
--- tools/lld/CMakeLists.txt
+++ tools/lld/CMakeLists.txt
@@ -8,3 +8,16 @@
 
 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}")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3066.1.patch
Type: text/x-patch
Size: 680 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140312/ab94c6e3/attachment.bin>


More information about the llvm-commits mailing list