[cfe-dev] "gcc compatible driver" internals

Joerg Sonnenberger joerg at britannica.bec.de
Wed Mar 30 14:53:36 PDT 2011


On Thu, Mar 31, 2011 at 12:02:02AM +0400, Konstantin Tokarev wrote:
> I'm trying to understand how does Clang driver work when executed in "gcc compatible mode".
> More specifically, I'm interested where CompilerInstance is created when Clang (not GCC or
> some other compiler) is actually used for compilation.

The clang driver accumulates various options and builds a list of each
input. For each input, it will invoke either the external tool for
handling it (e.g. the assembler for -no-integrated-as or the linker) or
itself (with -cc1 etc). It passes down the relevant variables as needed.
You can get the details by adding -v to the command line.

Joerg



More information about the cfe-dev mailing list