<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I think this is squared away with r288679. I tested with the Xcode generator, and it seems to be doing the right thing. Can you verify that it fixes VS as well?<div class=""><br class=""></div><div class="">Thanks,</div><div class="">-Chris</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 5, 2016, at 8:42 AM, Chris Bieneman via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Looking into this now. Thanks for the heads up.<div class=""><br class=""></div><div class="">-Chris</div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Dec 5, 2016, at 5:20 AM, Greg Bedwell <<a href="mailto:gregbedwell@gmail.com" class="">gregbedwell@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Hi,</div><div class=""><br class=""></div>Looks like this commit has caused new failures when using the multi-configuration Visual Studio CMake generators (e.g. "Visual Studio 14 2015 Win64".  All the regular executables are going to the expected place: "<build>/Release/bin", "<build>/Debug/bin", etc. but the "symlink" files (actually just copies on Windows) now get placed in "<build>/bin" instead:<div class=""><br class=""></div><div class=""><div class="">  Failing Tests (6):</div><div class="">      LLVM :: LibDriver/infer-output-path.test</div><div class="">      LLVM :: LibDriver/libpath.test</div><div class="">      LLVM :: LibDriver/no-inputs.test</div><div class="">      LLVM :: LibDriver/thin.test</div><div class="">      LLVM :: Object/archive-symtab.test</div><div class="">      LLVM :: Object/nm-archive.test</div></div><div class=""><br class=""></div><div class="">The fails are all of this sort of form:</div><div class="">"'C:/work/public-git/upstream-llvm/build-vs2015-ps4-master/Release/bin/llvm-lib': command not found"</div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">Greg</div><div class=""><br class=""></div><div class=""><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On 5 December 2016 at 03:28, Chris Bieneman via llvm-commits <span dir="ltr" class=""><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank" class="">llvm-commits@lists.llvm.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: cbieneman<br class="">
Date: Sun Dec  4 21:28:03 2016<br class="">
New Revision: 288632<br class="">
<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=288632&view=rev" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-<wbr class="">project?rev=288632&view=rev</a><br class="">
Log:<br class="">
[CMake] Refactor add_llvm_tool_symlink for reuse<br class="">
<br class="">
The old implementation of add_llvm_tool_symlink could fail in odd ways when building out of tree. This version solves that problem by not using the LLVM_* variables, and instead reaeding the target's properties.<br class="">
<br class="">
Modified:<br class="">
    llvm/trunk/cmake/modules/<wbr class="">AddLLVM.cmake<br class="">
<br class="">
Modified: llvm/trunk/cmake/modules/<wbr class="">AddLLVM.cmake<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=288632&r1=288631&r2=288632&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-<wbr class="">project/llvm/trunk/cmake/<wbr class="">modules/AddLLVM.cmake?rev=<wbr class="">288632&r1=288631&r2=288632&<wbr class="">view=diff</a><br class="">
==============================<wbr class="">==============================<wbr class="">==================<br class="">
--- llvm/trunk/cmake/modules/<wbr class="">AddLLVM.cmake (original)<br class="">
+++ llvm/trunk/cmake/modules/<wbr class="">AddLLVM.cmake Sun Dec  4 21:28:03 2016<br class="">
@@ -1288,43 +1288,54 @@ function(llvm_install_symlink name dest)<br class="">
   endif()<br class="">
 endfunction()<br class="">
<br class="">
-function(add_llvm_tool_<wbr class="">symlink name dest)<br class="">
-  cmake_parse_arguments(ARG "ALWAYS_GENERATE" "" "" ${ARGN})<br class="">
+function(add_llvm_tool_<wbr class="">symlink link_name target)<br class="">
+  cmake_parse_arguments(ARG "ALWAYS_GENERATE" "OUTPUT_DIR" "" ${ARGN})<br class="">
+  if(NOT ARG_OUTPUT_DIR)<br class="">
+    get_target_property(target_<wbr class="">type ${target} TYPE)<br class="">
+    if(${target_type} STREQUAL "STATIC_LIBRARY")<br class="">
+      get_target_property(ARG_<wbr class="">OUTPUT_DIR ${target} ARCHIVE_OUTPUT_DIRECTORY)<br class="">
+    elseif(UNIX AND ${target_type} STREQUAL "SHARED_LIBRARY")<br class="">
+      get_target_property(ARG_<wbr class="">OUTPUT_DIR ${target} LIBRARY_OUTPUT_DIRECTORY)<br class="">
+    else()<br class="">
+      get_target_property(ARG_<wbr class="">OUTPUT_DIR ${target} RUNTIME_OUTPUT_DIRECTORY)<br class="">
+    endif()<br class="">
+  endif()<br class="">
+<br class="">
   if(UNIX)<br class="">
     set(LLVM_LINK_OR_COPY create_symlink)<br class="">
-    set(dest_binary "${dest}${CMAKE_EXECUTABLE_<wbr class="">SUFFIX}")<br class="">
+    set(dest_binary "$<TARGET_FILE_NAME:${target}><wbr class="">")<br class="">
   else()<br class="">
     set(LLVM_LINK_OR_COPY copy)<br class="">
-    set(dest_binary "${LLVM_RUNTIME_OUTPUT_INTDIR}<wbr class="">/${dest}${CMAKE_EXECUTABLE_<wbr class="">SUFFIX}")<br class="">
+    set(dest_binary "$<TARGET_FILE:${target}>")<br class="">
   endif()<br class="">
<br class="">
-  set(output_path "${LLVM_RUNTIME_OUTPUT_INTDIR}<wbr class="">/${name}${CMAKE_EXECUTABLE_<wbr class="">SUFFIX}")<br class="">
+  set(output_path "${ARG_OUTPUT_DIR}/${link_<wbr class="">name}${CMAKE_EXECUTABLE_<wbr class="">SUFFIX}")<br class="">
<br class="">
-  set(target_name ${name})<br class="">
-  if(TARGET ${name})<br class="">
-    set(target_name ${name}-link)<br class="">
+  set(target_name ${link_name})<br class="">
+  if(TARGET ${link_name})<br class="">
+    set(target_name ${link_name}-link)<br class="">
   endif()<br class="">
<br class="">
<br class="">
   if(ARG_ALWAYS_GENERATE)<br class="">
     set_property(DIRECTORY APPEND PROPERTY<br class="">
       ADDITIONAL_MAKE_CLEAN_FILES ${dest_binary})<br class="">
-    add_custom_command(TARGET ${dest} POST_BUILD<br class="">
+    add_custom_command(TARGET ${target} POST_BUILD<br class="">
       COMMAND ${CMAKE_COMMAND} -E ${LLVM_LINK_OR_COPY} "${dest_binary}" "${output_path}")<br class="">
   else()<br class="">
     add_custom_command(OUTPUT ${output_path}<br class="">
                      COMMAND ${CMAKE_COMMAND} -E ${LLVM_LINK_OR_COPY} "${dest_binary}" "${output_path}"<br class="">
-                     DEPENDS ${dest})<br class="">
-    add_custom_target(${target_<wbr class="">name} ALL DEPENDS ${output_path})<br class="">
+                     DEPENDS ${target})<br class="">
+    add_custom_target(${target_<wbr class="">name} ALL DEPENDS ${target} ${output_path})<br class="">
     set_target_properties(${<wbr class="">target_name} PROPERTIES FOLDER Tools)<br class="">
<br class="">
     # Make sure both the link and target are toolchain tools<br class="">
-    if (${name} IN_LIST LLVM_TOOLCHAIN_TOOLS AND ${dest} IN_LIST LLVM_TOOLCHAIN_TOOLS)<br class="">
+    if (${link_name} IN_LIST LLVM_TOOLCHAIN_TOOLS AND ${target} IN_LIST LLVM_TOOLCHAIN_TOOLS)<br class="">
       set(TOOL_IS_TOOLCHAIN ON)<br class="">
     endif()<br class="">
<br class="">
     if ((TOOL_IS_TOOLCHAIN OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY) AND LLVM_BUILD_TOOLS)<br class="">
-      llvm_install_symlink(${name} ${dest})<br class="">
+      llvm_install_symlink(${link_<wbr class="">name} ${target})<br class="">
     endif()<br class="">
   endif()<br class="">
 endfunction()<br class="">
<br class="">
<br class="">
______________________________<wbr class="">_________________<br class="">
llvm-commits mailing list<br class="">
<a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/<wbr class="">mailman/listinfo/llvm-commits</a><br class="">
</blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></div>_______________________________________________<br class="">llvm-commits mailing list<br class=""><a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits<br class=""></div></blockquote></div><br class=""></div></body></html>