[cfe-dev] alternate clang driver

David Chisnall csdavec at swan.ac.uk
Fri Oct 21 14:47:16 PDT 2011


On 21 Oct 2011, at 22:15, reed kotler wrote:

> I don't buy the C++ is faster that Python argument. It's just a driver 
> for a compiler! You could write it in Turing machine primitives and it 
> would be super fast on a modern computer. It's not computing the 
> strongly connected components of a terabyte sized graph.

The issue is start-up time.  It takes longer to launch the python process than it does for the entire compilation and code generation process to happen on small C files at -O0.  

> I think you will have some kind of scripting component; whether it's LUA 
> or Python or some hand brewed language format that is read by the clang 
> driver and then interpreted, that is what you will have when you finish 
> solving this problem. That is what I meant by all solutions will be 
> isomorphic.


I disagree.  The number of things that different targets need are relatively limited.  The vast majority can get away with specifying default include paths, crt*.o locations, ld / as locations, and target triple.  If that solves 99% of cases, then it's worth doing that and leaving some external driver for the more complex weird cases.  

Adding a dependency on Python (or Lua, or what other buzzword scripting language that you favour this week) for invoking an [Objective-]C[++] compiler seems to redefine overkill.

David



More information about the cfe-dev mailing list