[cfe-dev] Compile Server?
dave at eclecticdave.com
Mon Jan 17 16:49:14 PST 2011
On 17/01/11 02:59, Reid Kleckner wrote:
> Sounds like integrating a minimalist build system into the compiler.
I was only thinking of a simple "compile these input files into these
output files using these compile flags" operation. Incremental builds
would be done by an external build system dynamically generating this
file prior to calling clang.
> I think it will also depend on what you're trying to optimize:
> incremental builds, or clean builds.
> For the latter, I don't think cutting out the subprocess spawning is
> worth very much. To really win, you want to cut out time spent
> reparsing the same old headers. If your project uses #include
> "world.h", PCH should work for you. If you don't, then C++ language
> semantics make it difficult to reuse results.
A single clang instance can cache the PCH structures in memory, saving
the need to read the PCH file repeatedly. I don't know if that saves
I am interested in the idea of auto-generating a PCH file where one
doesn't currently exist. That might be worth exploring.
> I think efforts on speeding up that kind of build should be built on
> some slightly modified variant of C++, so that you can parse headers
> in isolation and stitch together the ASTs.
I definitely agree that something along these lines would probably need
to be done to get truly impressive improvements in compile speeds - but
I don't yet know nearly enough about compiling C++ to even sensibly join
the discussion on that subject. I'm keen to learn though ;-)
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
More information about the cfe-dev