<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jan 28, 2014 at 2:38 AM, Richard Smith <span dir="ltr"><<a href="mailto:metafoo@gmail.com" target="_blank">metafoo@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><div>On Mon Jan 27 2014 at 4:51:40 PM, Yuri <<a href="mailto:yuri@rawbw.com" target="_blank">yuri@rawbw.com</a>> wrote:</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 01/27/2014 16:37, Jean-Daniel Dupas wrote:<br>

> If you want to debug/profile clang, you can invoke it directly with the -cc1 flag, and passing the right arguments.<br>
><br>
> To get the full command line used to invoke the real compilation process, you can use the -### argument:<br>
><br>
> clang -### -c -emit-llvm c.cpp<br>
><br>
> For the record, in the early days, the clang driver was a separate binary that used to invoke the compiler (which was called ccc IIRC).<br>
> Some time ago, the driver and the compiler were merged into a single clang binary, but it continue to work the same way it used to do. That explains why it executes itself.<br>
<br>
I see.<br>
So I wrote up my proposal to make this opt-in:<br>
<a href="http://llvm.org/bugs/show_bug.cgi?id=18638" target="_blank">http://llvm.org/bugs/show_bug.<u></u>cgi?id=18638</a></blockquote><div><br></div></div><div>I don't think the reasons why we spawn another binary have really been captured in this thread. The biggest reason is that the clang driver accepts multiple files to compile:</div>

<div><br></div><div>   clang foo.c bar.c baz.c -o thing</div><div><br></div><div>... and runs one compile process for each source file (and in this case, one link process for the binary). Crash recovery is just a nice side-effect of having a separate driver and frontend. The main benefit is that we get a consistent execution model regardless of the number of files passed to the driver.</div>
</blockquote><div><br></div><div>But nowadays with modules we also have in-process compilation steps of dependent modules without going through the whole driver enchilada, so is this becoming an obsolete argument?</div><div>
<br></div><div>Cheers,</div><div>/Manuel</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div></div>