<div dir="ltr"><div>> Support for out-of-tree builds, like BUILD_SHARED_LIBS or gn builds, are
 helpful for developers, but not relevant for release builds.<br><br>I disagree. Out-of-tree builds are also very useful for downstream distributors when packaging individual components of the LLVM project.<br><br></div>Isuru<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 31, 2020 at 2:45 PM Steve Scalpone via flang-dev <<a href="mailto:flang-dev@lists.llvm.org">flang-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



<div>
<div>+1 on Pete's and Tim's reply. I am often building multiple branches at the same time.  </div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_4464725073446024919divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> flang-dev <<a href="mailto:flang-dev-bounces@lists.llvm.org" target="_blank">flang-dev-bounces@lists.llvm.org</a>> on behalf of Peter Steinfeld via flang-dev <<a href="mailto:flang-dev@lists.llvm.org" target="_blank">flang-dev@lists.llvm.org</a>><br>
<b>Sent:</b> Friday, July 31, 2020 12:23 PM<br>
<b>To:</b> Michael Kruse <<a href="mailto:llvm@meinersbur.de" target="_blank">llvm@meinersbur.de</a>><br>
<b>Cc:</b> <a href="mailto:flang-dev@lists.llvm.org" target="_blank">flang-dev@lists.llvm.org</a> <<a href="mailto:flang-dev@lists.llvm.org" target="_blank">flang-dev@lists.llvm.org</a>><br>
<b>Subject:</b> Re: [flang-dev] Out-of-tree flang builds</font>
<div> </div>
</div>

<div lang="EN-US">
<table border="1" bgcolor="#FFEB9C">
<tbody>
<tr>
<td><font size="1" face="verdana" color="black"><b>External email: Use caution opening links or attachments</b>
</font></td>
</tr>
</tbody>
</table>
<br>
<div>
<div>
<p>Iterative builds are very useful and work well.</p>
<p> </p>
<p>But when I’m reviewing a change from someone else or starting on a new change for myself, I build all of flang.  In the last six hours, I’ve done four non-iterative builds, for example.</p>
<p> </p>
<p>Pete</p>
<p> </p>
<div>
<div style="border-color:rgb(225,225,225) currentcolor currentcolor;border-style:solid none none;border-width:1pt medium medium;padding:3pt 0in 0in">
<p><b>From:</b> Michael Kruse <<a href="mailto:llvm@meinersbur.de" target="_blank">llvm@meinersbur.de</a>> <br>
<b>Sent:</b> Friday, July 31, 2020 12:01 PM<br>
<b>To:</b> Peter Steinfeld <<a href="mailto:psteinfeld@nvidia.com" target="_blank">psteinfeld@nvidia.com</a>><br>
<b>Cc:</b> <a href="mailto:flang-dev@lists.llvm.org" target="_blank">flang-dev@lists.llvm.org</a><br>
<b>Subject:</b> Re: [flang-dev] Out-of-tree flang builds</p>
</div>
</div>
<p> </p>
<table style="background:rgb(255,235,156) none repeat scroll 0% 0%" cellspacing="5" cellpadding="0" border="1">
<tbody>
<tr>
<td style="padding:0.75pt">
<p><b><span style="font-size:7.5pt;font-family:"Verdana",sans-serif;color:black">External email: Use caution opening links or attachments</span></b><span style="font-size:7.5pt;font-family:"Verdana",sans-serif;color:black">
</span></p>
</td>
</tr>
</tbody>
</table>
<p> </p>
<div>
<div>
<p>Support for out-of-tree builds, like BUILD_SHARED_LIBS or gn builds, are helpful for developers, but not relevant for release builds. Requiring to maintain all combinations of build configurations is not feasible before every commit,
 this is why they are only best effort. When you notice a out-of-tree build breaking, you are free to fix the problem (and assuming the fix is straightforward, low-risk, without review).
</p>
<div>
<p> </p>
</div>
<div>
<p>However, I am wondering, why isn't an iterative build sufficient? Assuming you are not touching any non-flang files, make/ninja should not try to rebuild them.<br>
  </p>
<div>
<p>Michael</p>
</div>
<div>
<p> </p>
</div>
<div>
<p> </p>
</div>
</div>
</div>
<p> </p>
<div>
<div>
<p>Am Fr., 31. Juli 2020 um 13:41 Uhr schrieb Peter Steinfeld via flang-dev <<a href="mailto:flang-dev@lists.llvm.org" target="_blank">flang-dev@lists.llvm.org</a>>:</p>
</div>
<blockquote style="border-color:currentcolor currentcolor currentcolor rgb(204,204,204);border-style:none none none solid;border-width:medium medium medium 1pt;padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p>Out-of-tree builds are a way to build only the flang code using a pre-existing full build of llvm.  Out-of-tree flang builds are four times faster than full builds.  Thus, for those of us actively developing code and reviewing
 other people's changes, out-of-tree builds significantly improve our productivity.</p>
<p> </p>
<p>Unfortunately, out-of-tree builds are not currently supported by the llvm buildbots.  Thus, people changing build files must test this feature themselves.  The process of doing an out-of-tree build is described in the flang overview
 document -- <a href="https://github.com/llvm/llvm-project/tree/master/flang" target="_blank">
https://github.com/llvm/llvm-project/tree/master/flang</a>.  Alternatively, people changing build files could ask someone familiar with out-of-tree builds to review their changes.</p>
<p> </p>
<p>A recent update from David Truby broke out-of-tree builds --
<a href="https://reviews.llvm.org/D84022" target="_blank">https://reviews.llvm.org/D84022</a>.  In the conversation in the Phabricator review, David states that he understands that "out-of-tree builds are considered a "best effort" feature that isn't guaranteed
 to work".  But since out-of-tree builds are critical for my development, I don't consider them optional.</p>
<p> </p>
<p>I'm writing this note to bring this issue to the broader flang community.  I consider out-of-tree builds to be a critical feature that no change should break.  What do you think?</p>
</div>
</div>
<p>_______________________________________________<br>
flang-dev mailing list<br>
<a href="mailto:flang-dev@lists.llvm.org" target="_blank">flang-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev</a></p>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>

_______________________________________________<br>
flang-dev mailing list<br>
<a href="mailto:flang-dev@lists.llvm.org" target="_blank">flang-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev</a><br>
</blockquote></div>