<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, May 11, 2017 at 10:42 AM, Boris Kolpackov via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Nico,<br>
<span class="gmail-"><br>
Nico Weber <<a href="mailto:thakis@chromium.org">thakis@chromium.org</a>> writes:<br>
<br>
> Most distributed build systems I know about end up writing their own custom<br>
> preprocessor to very quickly discover which .h files are included by a cc<br>
> file (you don't need a full preprocessor for getting just that, and so you<br>
> can be faster than clang -E), and then send .h and .cc files to the server<br>
> based on content hashes, so that you don't need to send the full<br>
> preprocessed text, but can send source files before preprocessing.<br>
> <a href="https://github.com/facebookarchive/warp" rel="noreferrer" target="_blank">https://github.com/<wbr>facebookarchive/warp</a> was a somewhat recent example of<br>
> this (but also, as you say, pump mode, and proprietary systems).<br>
<br>
</span>One property that these build systems rely on is a very controlled<br>
environment (e.g., single compiler, all hosts have exactly the same<br>
headers, etc). I would much rather trade some speed for using standard<br>
and robust tooling.<br>
<br>
Also, I saw it mentioned (I think in the pump's documentation) that<br>
local preprocessing is a lot less of an issue on modern hardware. I<br>
bet SSDs made quite a difference.</blockquote><div><br></div><div>It's still an issue, because you will end up sending the pre-processed file over the network. Time has shown that the transitive include closure of a C++ file scales linearly with the size of the codebase, so the bigger the project, the more time you spend sending 10MB .ii files over the wire.</div><div><br></div><div>As you say, pre-processing is more robust than trying to send each header individually, set them up on the remote builder, and cache them, but it does leave performance on the table.<br></div></div></div></div>