<div dir="ltr">ccache can help as well, even for a standalone build in the non-iterative (it won't provide as much benefits as the standalone build of course, I'm not saying this can replace them).<div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 31, 2020 at 12:23 PM Peter Steinfeld 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-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div lang="EN-US">
<div class="gmail-m_-1491073479072609703WordSection1">
<p class="MsoNormal">Iterative builds are very useful and work well.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">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.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Pete<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div style="border-style:solid none none;border-top-width:1pt;border-top-color:rgb(225,225,225);padding:3pt 0in 0in">
<p class="MsoNormal"><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<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<table border="1" cellspacing="5" cellpadding="0" style="background-color:rgb(255,235,156);background-position:initial initial;background-repeat:initial initial">
<tbody>
<tr>
<td style="padding:0.75pt">
<p class="MsoNormal"><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><u></u><u></u></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">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).
<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">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>
<u></u><u></u></p>
<div>
<p class="MsoNormal">Michael<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">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>>:<u></u><u></u></p>
</div>
<blockquote style="border-style:none none none solid;border-left-width:1pt;border-left-color:rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal">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.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">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.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">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.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">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?<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal">_______________________________________________<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><u></u><u></u></p>
</blockquote>
</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>