<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 19 June 2015 at 15:57, Mehdi Amini <span dir="ltr"><<a href="mailto:mehdi.amini@apple.com" target="_blank">mehdi.amini@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi,<div><br></div><div>If you just want to *link* to LLVM, it is not clear to me why you are not just relying on LLVM being built separately and have your project CMake pointing to the llvm build directory and using llvm-config to populate the linker argument? </div><div><br></div><div>Best,</div><div>— </div><span class="HOEnZb"><font color="#888888"><div>Mehdi</div></font></span></div></blockquote><div><br></div><div>This is what I do in my Pascal compiler project. It may not be the perfect solution, but I have not found any HUGE drawback yet.<br><br>--<br></div><div>Mats <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"><div><div class="h5"><div><br><div><blockquote type="cite"><div>On Jun 19, 2015, at 7:38 AM, John Criswell <<a href="mailto:jtcriswel@gmail.com" target="_blank">jtcriswel@gmail.com</a>> wrote:</div><br><div>
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>Dear All,<br>
      <br>
      Thanks for the feedback.<br>
      <br>
      To clarify, this is for LLVM-related projects that are linking
      against the LLVM libraries.<br>
      <br>
      The feature for keeping our source code in arbitrary locations
      isn't something we need.  If we can just drop our source code into
      llvm/projects (or some other designated LLVM subdirectory) and
      write LLVM-esque CMake files, that should be enough for projects
      that don't need to patch the existing LLVM tools.<br>
      <br>
      Regards,<br>
      <br>
      John Criswell<br>
      <br>
      <br>
      On 6/18/15 9:06 PM, Chandler Carruth wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div class="gmail_quote">
          <div dir="ltr">On Thu, Jun 18, 2015 at 5:50 PM Hal Finkel <<a href="mailto:hfinkel@anl.gov" target="_blank">hfinkel@anl.gov</a>>
            wrote:<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This is
            also related to the metapoint that the cmake build system
            doesn't glob for source files (or anything else), unlike the
            makefile build system. This is understandable given the
            constraints, but we might want to restore some of that
            functionality for the purpose of supporting out-of-tree
            projects.<br>
          </blockquote>
          <div><br>
          </div>
          <div>I actually think these are completely separate. See
            below.</div>
          <div> </div>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <br>
            What I mean specifically, is that, for example, we could
            have a normally-empty directory tools/extensions, and
            tools/CMakeLists.txt could glob for directories in
            tools/extensions and call add_llvm_tool_subdirectory on all
            of them. It is true that you'd need to re-run cmake whenever
            you added something there (we could have a README in that
            directory to remind people of that), but that seems like a
            much smaller price than having to maintain a patched version
            of the upstream sources.<br>
          </blockquote>
          <div><br>
          </div>
          <div>We already do this in numerous places. See
            projects/CMakeLists.txt which does exactly this.</div>
          <div><br>
          </div>
          <div>We don't automatically support external projects *in
            different locations* through globbing, but that's because
            that doesn't make any sense.</div>
          <div><br>
          </div>
          <div>We can add globbing-based recursion to subproject CMake
            files anywhere it is useful.</div>
          <div><br>
          </div>
          <div>There is no problem with globbing to add subdirectories
            IMO because subdirectories *with new CMake files* clearly
            have to be introduced and maintained at the points you run
            the 'cmake' tool. Only globbing for *source files* seems
            problematic to me at all.</div>
          <div><br>
          </div>
          <div>-Chandler</div>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
LLVM Developers mailing list
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu/" target="_blank">http://llvm.cs.uiuc.edu</a>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
</pre>
    </blockquote>
    <br>
    <br>
    <pre cols="72">-- 
John Criswell
Assistant Professor
Department of Computer Science, University of Rochester
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.cs.rochester.edu_u_criswell&d=AwMD-g&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=4OeKj9B2JjfLUvqRMUSgftUrExBMlakSczNUQb3B5bU&s=D5Q1Ase7UHtkcpB-jO-JMfUNW5BFFSp0eCBvoOMEc70&e=" target="_blank">http://www.cs.rochester.edu/u/criswell</a></pre>
  </div>

_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></div></blockquote></div><br></div></div></div></div><br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" rel="noreferrer" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></div></div>