<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I’ve put a fix into clang in r272275. That should make this work for you. Please let me know if it doesn’t work.<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 Jun 9, 2016, at 4:05 AM, Will Dietz <<a href="mailto:wdietz2@illinois.edu" class="">wdietz2@illinois.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi!<div class=""><br class=""></div><div class="">This change seems to have broken my ability to build clang out-of-tree, for reasons that seem to essentially come down to LLVM_TOOLS_INSTALL_DIR not being set, resulting in generation of install_symlink() commands with a missing third parameter.</div><div class=""><br class=""></div><div class="">I'd offer a patch but I'm not sure how to best address the issue, any ideas?</div><div class=""><br class=""></div><div class="">Looks like many properties are gathered from llvm-config when doing a standalone clang build[1], although I think for this we might be able to default to 'bin' unless user overrides it.</div><div class=""><br class=""></div><div class="">Anyway hopefully there's an easy answer, thanks for your time :)</div><div class=""><br class=""></div><div class="">~Will</div><div class=""><br class=""></div><div class="">[1] <a href="https://github.com/llvm-mirror/clang/blob/1f6336d3adfb5ba2aa784f2e64cfb451d365abf2/CMakeLists.txt#L19" class="">https://github.com/llvm-mirror/clang/blob/1f6336d3adfb5ba2aa784f2e64cfb451d365abf2/CMakeLists.txt#L19</a></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Wed, Jun 8, 2016 at 4:26 PM Chris Bieneman via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: cbieneman<br class="">
Date: Wed Jun  8 16:19:26 2016<br class="">
New Revision: 272200<br class="">
<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=272200&view=rev" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project?rev=272200&view=rev</a><br class="">
Log:<br class="">
[CMake] Support overriding binary install directory<br class="">
<br class="">
This patch adds a new option LLVM_TOOLS_INSTALL_DIR which allows customizing the location executables and symlinks get installed to. This adds the functionality provided by autoconf's --bindir flag.<br class="">
<br class="">
This patch is based on patches from and collaboration with Tony Kelman, and replaces <a href="http://reviews.llvm.org/D20934" rel="noreferrer" target="_blank" class="">http://reviews.llvm.org/D20934</a>.<br class="">
<br class="">
Modified:<br class="">
    llvm/trunk/CMakeLists.txt<br class="">
    llvm/trunk/cmake/modules/AddLLVM.cmake<br class="">
    llvm/trunk/cmake/modules/TableGen.cmake<br class="">
<br class="">
Modified: llvm/trunk/CMakeLists.txt<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=272200&r1=272199&r2=272200&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=272200&r1=272199&r2=272200&view=diff</a><br class="">
==============================================================================<br class="">
--- llvm/trunk/CMakeLists.txt (original)<br class="">
+++ llvm/trunk/CMakeLists.txt Wed Jun  8 16:19:26 2016<br class="">
@@ -201,6 +201,9 @@ endif()<br class="">
<br class="">
 set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" )<br class="">
<br class="">
+set(LLVM_TOOLS_INSTALL_DIR "bin" CACHE STRING "Path for binary subdirectory (defaults to 'bin')")<br class="">
+mark_as_advanced(LLVM_TOOLS_INSTALL_DIR)<br class="">
+<br class="">
 # They are used as destination of target generators.<br class="">
 set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)<br class="">
 set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})<br class="">
<br class="">
Modified: llvm/trunk/cmake/modules/AddLLVM.cmake<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=272200&r1=272199&r2=272200&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=272200&r1=272199&r2=272200&view=diff</a><br class="">
==============================================================================<br class="">
--- llvm/trunk/cmake/modules/AddLLVM.cmake (original)<br class="">
+++ llvm/trunk/cmake/modules/AddLLVM.cmake Wed Jun  8 16:19:26 2016<br class="">
@@ -771,7 +771,7 @@ macro(add_llvm_tool name)<br class="">
     if( LLVM_BUILD_TOOLS )<br class="">
       install(TARGETS ${name}<br class="">
               EXPORT LLVMExports<br class="">
-              RUNTIME DESTINATION bin<br class="">
+              RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR}<br class="">
               COMPONENT ${name})<br class="">
<br class="">
       if (NOT CMAKE_CONFIGURATION_TYPES)<br class="">
@@ -1211,7 +1211,7 @@ function(llvm_install_symlink name dest)<br class="">
   set(full_dest ${dest}${CMAKE_EXECUTABLE_SUFFIX})<br class="">
<br class="">
   install(SCRIPT ${INSTALL_SYMLINK}<br class="">
-          CODE "install_symlink(${full_name} ${full_dest} bin)"<br class="">
+          CODE "install_symlink(${full_name} ${full_dest} ${LLVM_TOOLS_INSTALL_DIR})"<br class="">
           COMPONENT ${component})<br class="">
<br class="">
   if (NOT CMAKE_CONFIGURATION_TYPES AND NOT ARG_ALWAYS_GENERATE)<br class="">
<br class="">
Modified: llvm/trunk/cmake/modules/TableGen.cmake<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/TableGen.cmake?rev=272200&r1=272199&r2=272200&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/TableGen.cmake?rev=272200&r1=272199&r2=272200&view=diff</a><br class="">
==============================================================================<br class="">
--- llvm/trunk/cmake/modules/TableGen.cmake (original)<br class="">
+++ llvm/trunk/cmake/modules/TableGen.cmake Wed Jun  8 16:19:26 2016<br class="">
@@ -141,7 +141,7 @@ macro(add_tablegen target project)<br class="">
   if (${project} STREQUAL LLVM AND NOT LLVM_INSTALL_TOOLCHAIN_ONLY)<br class="">
     install(TARGETS ${target}<br class="">
             EXPORT LLVMExports<br class="">
-            RUNTIME DESTINATION bin)<br class="">
+            RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR})<br class="">
   endif()<br class="">
   set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${target})<br class="">
 endmacro()<br class="">
<br class="">
<br class="">
_______________________________________________<br class="">
llvm-commits mailing list<br class="">
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank" 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/mailman/listinfo/llvm-commits</a><br class="">
</blockquote></div>
</div></blockquote></div><br class=""></div></body></html>