[cfe-dev] Question on clang design - Why clang doesn't use pooling of Process

Konstantin Tokarev annulen at yandex.ru
Wed Jul 25 06:04:35 PDT 2012



25.07.2012, 15:46, "Journeyer J. Joh" <oosaprogrammer at gmail.com>:
> Hello, list
>
> I am reading clang source code.
> And while my reading of it I found that clang as a driver invokes
> another clang as a worker process to convert a input file to the
> output file.
> This method looks weird to me because the driver clang invokes worker
> clang so many times. It would be the number of input source  file!
> This means that 1000 C source code compile would invokes clang 1000 +
> 1 times.

But if you want to run 1000 working processes from one driver, it does need
to know which files to compile, in which order, and which options use for
each file.

It shouldn't be difficult to integrate clang driver into Ninja, but this way may not
be appropriate for other build systems.

-- 
Regards,
Konstantin



More information about the cfe-dev mailing list