<div dir="ltr">Great, thanks! LGTM! (And my non-clang out-of-tree projects thank you for your consideration :))<div dir="ltr"><div><br></div><div>~Will</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Jun 9, 2016 at 12:32 PM Chris Bieneman <<a href="mailto:beanz@apple.com" target="_blank">beanz@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Thinking on the more the fix I put in clang was hacky. The correct fix is in LLVM r272279.</div><div style="word-wrap:break-word"><div><br></div><div>-Chris</div></div><div style="word-wrap:break-word"><div><br><div><blockquote type="cite"><div>On Jun 9, 2016, at 9:28 AM, Chris Bieneman via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:</div><br><div><div style="word-wrap:break-word">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><br></div><div>Thanks,</div><div>-Chris</div><div><br><div><blockquote type="cite"><div>On Jun 9, 2016, at 4:05 AM, Will Dietz <<a href="mailto:wdietz2@illinois.edu" target="_blank">wdietz2@illinois.edu</a>> wrote:</div><br><div><div dir="ltr">Hi!<div><br></div><div>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><br></div><div>I'd offer a patch but I'm not sure how to best address the issue, any ideas?</div><div><br></div><div>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><br></div><div>Anyway hopefully there's an easy answer, thanks for your time :)</div><div><br></div><div>~Will</div><div><br></div><div>[1] <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_llvm-2Dmirror_clang_blob_1f6336d3adfb5ba2aa784f2e64cfb451d365abf2_CMakeLists.txt-23L19&d=CwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=xXEIrBAdbZE_31L02EhdCnl1kUxtVS4j8o9vydj_vKk&m=THSQpI2t6UJV3kHpIOKQxULglc6okovBnOSHmunH7Do&s=-WRu_aUkx4x9BpfNmIdQgWylXXdXFOEL5EkWY-WU0v0&e=" target="_blank">https://github.com/llvm-mirror/clang/blob/1f6336d3adfb5ba2aa784f2e64cfb451d365abf2/CMakeLists.txt#L19</a></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Jun 8, 2016 at 4:26 PM Chris Bieneman via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: cbieneman<br>
Date: Wed Jun  8 16:19:26 2016<br>
New Revision: 272200<br>
<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D272200-26view-3Drev&d=CwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=xXEIrBAdbZE_31L02EhdCnl1kUxtVS4j8o9vydj_vKk&m=THSQpI2t6UJV3kHpIOKQxULglc6okovBnOSHmunH7Do&s=PdTQYopYJ7Y56O8-7etumQqT0MLPb2WK1bvxZJH9edk&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=272200&view=rev</a><br>
Log:<br>
[CMake] Support overriding binary install directory<br>
<br>
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>
<br>
This patch is based on patches from and collaboration with Tony Kelman, and replaces <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D20934&d=CwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=xXEIrBAdbZE_31L02EhdCnl1kUxtVS4j8o9vydj_vKk&m=THSQpI2t6UJV3kHpIOKQxULglc6okovBnOSHmunH7Do&s=aBkCgO7ZKLFYaE7VmWVPheNsgHAOd2Mpq1AizvBeZRI&e=" rel="noreferrer" target="_blank">http://reviews.llvm.org/D20934</a>.<br>
<br>
Modified:<br>
    llvm/trunk/CMakeLists.txt<br>
    llvm/trunk/cmake/modules/AddLLVM.cmake<br>
    llvm/trunk/cmake/modules/TableGen.cmake<br>
<br>
Modified: llvm/trunk/CMakeLists.txt<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_CMakeLists.txt-3Frev-3D272200-26r1-3D272199-26r2-3D272200-26view-3Ddiff&d=CwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=xXEIrBAdbZE_31L02EhdCnl1kUxtVS4j8o9vydj_vKk&m=THSQpI2t6UJV3kHpIOKQxULglc6okovBnOSHmunH7Do&s=Xf_TNsgCFgHkNj9-YJJHvh_NWdMwevxmMaVyLFC2Y28&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=272200&r1=272199&r2=272200&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/CMakeLists.txt (original)<br>
+++ llvm/trunk/CMakeLists.txt Wed Jun  8 16:19:26 2016<br>
@@ -201,6 +201,9 @@ endif()<br>
<br>
 set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" )<br>
<br>
+set(LLVM_TOOLS_INSTALL_DIR "bin" CACHE STRING "Path for binary subdirectory (defaults to 'bin')")<br>
+mark_as_advanced(LLVM_TOOLS_INSTALL_DIR)<br>
+<br>
 # They are used as destination of target generators.<br>
 set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)<br>
 set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})<br>
<br>
Modified: llvm/trunk/cmake/modules/AddLLVM.cmake<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_cmake_modules_AddLLVM.cmake-3Frev-3D272200-26r1-3D272199-26r2-3D272200-26view-3Ddiff&d=CwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=xXEIrBAdbZE_31L02EhdCnl1kUxtVS4j8o9vydj_vKk&m=THSQpI2t6UJV3kHpIOKQxULglc6okovBnOSHmunH7Do&s=QV7S95H5YNoqQG4UDfNVrS7vK_bgSlNWsQ3jhcLHa1E&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=272200&r1=272199&r2=272200&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/cmake/modules/AddLLVM.cmake (original)<br>
+++ llvm/trunk/cmake/modules/AddLLVM.cmake Wed Jun  8 16:19:26 2016<br>
@@ -771,7 +771,7 @@ macro(add_llvm_tool name)<br>
     if( LLVM_BUILD_TOOLS )<br>
       install(TARGETS ${name}<br>
               EXPORT LLVMExports<br>
-              RUNTIME DESTINATION bin<br>
+              RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR}<br>
               COMPONENT ${name})<br>
<br>
       if (NOT CMAKE_CONFIGURATION_TYPES)<br>
@@ -1211,7 +1211,7 @@ function(llvm_install_symlink name dest)<br>
   set(full_dest ${dest}${CMAKE_EXECUTABLE_SUFFIX})<br>
<br>
   install(SCRIPT ${INSTALL_SYMLINK}<br>
-          CODE "install_symlink(${full_name} ${full_dest} bin)"<br>
+          CODE "install_symlink(${full_name} ${full_dest} ${LLVM_TOOLS_INSTALL_DIR})"<br>
           COMPONENT ${component})<br>
<br>
   if (NOT CMAKE_CONFIGURATION_TYPES AND NOT ARG_ALWAYS_GENERATE)<br>
<br>
Modified: llvm/trunk/cmake/modules/TableGen.cmake<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_cmake_modules_TableGen.cmake-3Frev-3D272200-26r1-3D272199-26r2-3D272200-26view-3Ddiff&d=CwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=xXEIrBAdbZE_31L02EhdCnl1kUxtVS4j8o9vydj_vKk&m=THSQpI2t6UJV3kHpIOKQxULglc6okovBnOSHmunH7Do&s=eNKZCKoX4RzDjUS0Kogs5mnEaFeIIRugYAzi5d2-e_4&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/TableGen.cmake?rev=272200&r1=272199&r2=272200&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/cmake/modules/TableGen.cmake (original)<br>
+++ llvm/trunk/cmake/modules/TableGen.cmake Wed Jun  8 16:19:26 2016<br>
@@ -141,7 +141,7 @@ macro(add_tablegen target project)<br>
   if (${project} STREQUAL LLVM AND NOT LLVM_INSTALL_TOOLCHAIN_ONLY)<br>
     install(TARGETS ${target}<br>
             EXPORT LLVMExports<br>
-            RUNTIME DESTINATION bin)<br>
+            RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR})<br>
   endif()<br>
   set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${target})<br>
 endmacro()<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_llvm-2Dcommits&d=CwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=xXEIrBAdbZE_31L02EhdCnl1kUxtVS4j8o9vydj_vKk&m=THSQpI2t6UJV3kHpIOKQxULglc6okovBnOSHmunH7Do&s=SCq4kCl2tSXQReap0hGaCo-xjss8sukDM1Vnho1NxsY&e=" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>
</div></blockquote></div><br></div></div>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br></div></blockquote></div><br></div></div></blockquote></div></div>